File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/PowerShellEditorServices/Debugging Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -106,11 +106,6 @@ public async Task<BreakpointDetails[]> SetLineBreakpoints(
106106 . CurrentRunspace
107107 . GetCapability < DscBreakpointCapability > ( ) ;
108108
109- if ( clearExisting && dscBreakpoints == null )
110- {
111- await this . ClearBreakpointsInFile ( scriptFile ) ;
112- }
113-
114109 // Make sure we're using the remote script path
115110 string scriptPath = scriptFile . FilePath ;
116111 if ( this . powerShellContext . CurrentRunspace . Location == RunspaceLocation . Remote &&
@@ -150,6 +145,11 @@ public async Task<BreakpointDetails[]> SetLineBreakpoints(
150145
151146 if ( dscBreakpoints == null || ! dscBreakpoints . IsDscResourcePath ( escapedScriptPath ) )
152147 {
148+ if ( clearExisting )
149+ {
150+ await this . ClearBreakpointsInFile ( scriptFile ) ;
151+ }
152+
153153 foreach ( BreakpointDetails breakpoint in breakpoints )
154154 {
155155 PSCommand psCommand = new PSCommand ( ) ;
You can’t perform that action at this time.
0 commit comments