Skip to content

Commit 3e785a1

Browse files
committed
Fix issue where breakpoints aren't being cleared
1 parent a635b42 commit 3e785a1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/PowerShellEditorServices/Debugging/DebugService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)