Skip to content

Commit 0480ab6

Browse files
committed
Add comment explaining remote debug setting
1 parent 1a62125 commit 0480ab6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/PowerShellEditorServices/Services/PowerShell/Debugging/PowerShellDebugContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public Task<DscBreakpointCapability> GetDscBreakpointCapabilityAsync(Cancellatio
6767

6868
public void EnableDebugMode()
6969
{
70+
// This is required by the PowerShell API so that remote debugging works.
71+
// Without it, a runspace may not have these options set and attempting to set breakpoints remotely can fail.
7072
_psesHost.Runspace.Debugger.SetDebugMode(DebugModes.LocalScript | DebugModes.RemoteScript);
7173
}
7274

0 commit comments

Comments
 (0)