We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d19bf3 commit 5a110b4Copy full SHA for 5a110b4
src/PowerShellEditorServices.Protocol/Server/DebugAdapter.cs
@@ -253,8 +253,9 @@ protected async Task HandleLaunchRequest(
253
launchParams.Program;
254
#pragma warning restore 618
255
256
- // We come through here first when debugging an untitled (unsaved) file - there is now working dir.
257
- if (workingDir.StartsWith("untitled:"))
+ // When debugging an "untitled" (unsaved) file - the working dir can't be derived
+ // from the Script path. OTOH, if the launch params specifies a Cwd, use it.
258
+ if (workingDir.StartsWith("untitled:") && string.IsNullOrEmpty(launchParams.Cwd))
259
{
260
workingDir = null;
261
}
0 commit comments