File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export class DebugSessionFeature implements IFeature {
42
42
43
43
if ( config . request === 'launch' ) {
44
44
// Make sure there's a usable working directory if possible
45
- config . cwd = config . cwd || vscode . workspace . rootPath || config . script ;
45
+ config . cwd = config . cwd || vscode . workspace . rootPath ;
46
46
47
47
// For launch of "current script", don't start the debugger if the current file
48
48
// is not a file that can be debugged by PowerShell
@@ -80,6 +80,12 @@ export class DebugSessionFeature implements IFeature {
80
80
}
81
81
}
82
82
}
83
+ else if ( config . script ) {
84
+ // In this case, the user has explicitly defined a script path
85
+ // so make sure to set the cwd to that path if the cwd wasn't
86
+ // explicitly set
87
+ config . cwd = config . cwd || config . script ;
88
+ }
83
89
}
84
90
85
91
// Prevent the Debug Console from opening
You can’t perform that action at this time.
0 commit comments