Skip to content

Commit 347f500

Browse files
Fix synced breakpoints for untitled files
1 parent bed8cc3 commit 347f500

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PowerShellEditorServices/Services/DebugAdapter/BreakpointSyncService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,9 @@ private static SyncedBreakpoint CreateFromServerBreakpoint(Breakpoint serverBrea
694694
if (clientBreakpoint.Location is not null)
695695
{
696696
kind = SyncedBreakpointKind.Line;
697-
script = clientBreakpoint.Location.Uri.GetFileSystemPath();
697+
script = clientBreakpoint.Location.Uri.Scheme is "untitled"
698+
? clientBreakpoint.Location.Uri.ToString()
699+
: clientBreakpoint.Location.Uri.GetFileSystemPath();
698700
line = clientBreakpoint.Location.Range.Start.Line + 1;
699701
column = clientBreakpoint.Location.Range.Start.Character is int c and not 0 ? c : 0;
700702
}

0 commit comments

Comments
 (0)