@@ -27,7 +27,7 @@ public class DebugAdapter : DebugAdapterBase
2727
2828 private bool noDebug ;
2929 private bool waitingForAttach ;
30- private string scriptPathToLaunch ;
30+ private string scriptToLaunch ;
3131 private string arguments ;
3232
3333 public DebugAdapter ( HostDetails hostDetails , ProfilePaths profilePaths )
@@ -83,7 +83,7 @@ protected override void Initialize()
8383 protected Task LaunchScript ( RequestContext < object > requestContext )
8484 {
8585 return editorSession . PowerShellContext
86- . ExecuteScriptAtPath ( this . scriptPathToLaunch , this . arguments )
86+ . ExecuteScriptWithArgs ( this . scriptToLaunch , this . arguments )
8787 . ContinueWith (
8888 async ( t ) => {
8989 Logger . Write ( LogLevel . Verbose , "Execution completed, flushing output then terminating..." ) ;
@@ -120,7 +120,7 @@ protected async Task HandleConfigurationDoneRequest(
120120 object args ,
121121 RequestContext < object > requestContext )
122122 {
123- if ( ! string . IsNullOrEmpty ( this . scriptPathToLaunch ) )
123+ if ( ! string . IsNullOrEmpty ( this . scriptToLaunch ) )
124124 {
125125 if ( this . editorSession . PowerShellContext . SessionState == PowerShellContextState . Ready )
126126 {
@@ -144,8 +144,8 @@ protected async Task HandleLaunchRequest(
144144 LaunchRequestArguments launchParams ,
145145 RequestContext < object > requestContext )
146146 {
147- // Set the working directory for the PowerShell runspace to the cwd passed in via launch.json.
148- // In case that is null, use the the folder of the script to be executed. If the resulting
147+ // Set the working directory for the PowerShell runspace to the cwd passed in via launch.json.
148+ // In case that is null, use the the folder of the script to be executed. If the resulting
149149 // working dir path is a file path then extract the directory and use that.
150150 string workingDir =
151151 launchParams . Cwd ??
@@ -195,15 +195,15 @@ protected async Task HandleLaunchRequest(
195195 // Store the launch parameters so that they can be used later
196196 this . noDebug = launchParams . NoDebug ;
197197#pragma warning disable 618
198- this . scriptPathToLaunch = launchParams . Script ?? launchParams . Program ;
198+ this . scriptToLaunch = launchParams . Script ?? launchParams . Program ;
199199#pragma warning restore 618
200200 this . arguments = arguments ;
201201
202202 await requestContext . SendResult ( null ) ;
203203
204204 // If no script is being launched, execute an empty script to
205205 // cause the prompt string to be evaluated and displayed
206- if ( string . IsNullOrEmpty ( this . scriptPathToLaunch ) )
206+ if ( string . IsNullOrEmpty ( this . scriptToLaunch ) )
207207 {
208208 await this . editorSession . PowerShellContext . ExecuteScriptString (
209209 "" , false , true ) ;
@@ -222,7 +222,7 @@ protected async Task HandleAttachRequest(
222222 {
223223 // If there are no host processes to attach to or the user cancels selection, we get a null for the process id.
224224 // This is not an error, just a request to stop the original "attach to" request.
225- // Testing against "undefined" is a HACK because I don't know how to make "Cancel" on quick pick loading
225+ // Testing against "undefined" is a HACK because I don't know how to make "Cancel" on quick pick loading
226226 // to cancel on the VSCode side without sending an attachRequest with processId set to "undefined".
227227 if ( string . IsNullOrEmpty ( attachParams . ProcessId ) || ( attachParams . ProcessId == "undefined" ) )
228228 {
@@ -364,7 +364,7 @@ protected async Task HandleSetBreakpointsRequest(
364364 catch ( Exception e ) when ( e is FileNotFoundException || e is DirectoryNotFoundException )
365365 {
366366 Logger . Write (
367- LogLevel . Warning ,
367+ LogLevel . Warning ,
368368 $ "Attempted to set breakpoints on a non-existing file: { setBreakpointsParams . Source . Path } ") ;
369369
370370 string message = this . noDebug ? string . Empty : "Source does not exist, breakpoint not set." ;
@@ -387,9 +387,9 @@ await requestContext.SendResult(
387387 {
388388 SourceBreakpoint srcBreakpoint = setBreakpointsParams . Breakpoints [ i ] ;
389389 breakpointDetails [ i ] = BreakpointDetails . Create (
390- scriptFile . FilePath ,
391- srcBreakpoint . Line ,
392- srcBreakpoint . Column ,
390+ scriptFile . FilePath ,
391+ srcBreakpoint . Line ,
392+ srcBreakpoint . Column ,
393393 srcBreakpoint . Condition ,
394394 srcBreakpoint . HitCondition ) ;
395395 }
@@ -541,7 +541,7 @@ protected async Task HandleStackTraceRequest(
541541 // be referenced back to the current list of stack frames
542542 newStackFrames . Add (
543543 StackFrame . Create (
544- stackFrames [ i ] ,
544+ stackFrames [ i ] ,
545545 i ) ) ;
546546 }
547547
@@ -712,9 +712,9 @@ async void DebugService_DebuggerStopped(object sender, DebuggerStoppedEventArgs
712712
713713 // Provide the reason for why the debugger has stopped script execution.
714714 // See https://github.com/Microsoft/vscode/issues/3648
715- // The reason is displayed in the breakpoints viewlet. Some recommended reasons are:
715+ // The reason is displayed in the breakpoints viewlet. Some recommended reasons are:
716716 // "step", "breakpoint", "function breakpoint", "exception" and "pause".
717- // We don't support exception breakpoints and for "pause", we can't distinguish
717+ // We don't support exception breakpoints and for "pause", we can't distinguish
718718 // between stepping and the user pressing the pause/break button in the debug toolbar.
719719 string debuggerStoppedReason = "step" ;
720720 if ( e . OriginalEvent . Breakpoints . Count > 0 )
0 commit comments