|
1 | 1 | // Copyright (c) Microsoft Corporation.
|
2 | 2 | // Licensed under the MIT License.
|
3 | 3 |
|
4 |
| -using Microsoft.Extensions.Logging; |
5 |
| -using Microsoft.PowerShell.EditorServices.Services.PowerShell.Host; |
6 |
| -using Microsoft.PowerShell.EditorServices.Services.PowerShell.Utility; |
7 |
| -using Microsoft.PowerShell.EditorServices.Utility; |
8 | 4 | using System;
|
9 | 5 | using System.Collections.Generic;
|
10 | 6 | using System.Collections.ObjectModel;
|
11 | 7 | using System.Management.Automation;
|
12 | 8 | using System.Management.Automation.Remoting;
|
13 | 9 | using System.Threading;
|
| 10 | +using Microsoft.Extensions.Logging; |
| 11 | +using Microsoft.PowerShell.EditorServices.Services.PowerShell.Host; |
| 12 | +using Microsoft.PowerShell.EditorServices.Services.PowerShell.Utility; |
| 13 | +using Microsoft.PowerShell.EditorServices.Utility; |
14 | 14 | using SMA = System.Management.Automation;
|
15 | 15 |
|
16 | 16 | namespace Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution
|
@@ -49,7 +49,7 @@ public override IReadOnlyList<TResult> Run(CancellationToken cancellationToken)
|
49 | 49 |
|
50 | 50 | if (PowerShellExecutionOptions.WriteInputToHost)
|
51 | 51 | {
|
52 |
| - _psesHost.UI.WriteLine(_psCommand.GetInvocationText()); |
| 52 | + _psesHost.WriteWithPrompt(_psCommand, cancellationToken); |
53 | 53 | }
|
54 | 54 |
|
55 | 55 | return _pwsh.Runspace.Debugger.InBreakpoint
|
@@ -234,7 +234,7 @@ private void StopDebuggerIfRemoteDebugSessionFailed()
|
234 | 234 |
|
235 | 235 | foreach (PSObject output in outputCollection)
|
236 | 236 | {
|
237 |
| - if (object.Equals(output?.BaseObject, false)) |
| 237 | + if (Equals(output?.BaseObject, false)) |
238 | 238 | {
|
239 | 239 | _psesHost.DebugContext.ProcessDebuggerResult(new DebuggerCommandResults(DebuggerResumeAction.Stop, evaluatedByDebugger: true));
|
240 | 240 | _logger.LogWarning("Cancelling debug session due to remote command cancellation causing the end of remote debugging session");
|
|
0 commit comments