File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
src/PowerShellEditorServices.Protocol Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public async Task LaunchScript(string scriptFilePath)
2222 await this . SendRequest (
2323 LaunchRequest . Type ,
2424 new LaunchRequestArguments {
25- Program = scriptFilePath
25+ Script = scriptFilePath
2626 } ) ;
2727
2828 await this . SendRequest ( ConfigurationDoneRequest . Type , null ) ;
Original file line number Diff line number Diff line change 33// Licensed under the MIT license. See LICENSE file in the project root for full license information.
44//
55
6+ using System ;
67using System . Collections . Generic ;
78using Microsoft . PowerShell . EditorServices . Protocol . MessageProtocol ;
89
@@ -20,8 +21,14 @@ public class LaunchRequestArguments
2021 /// <summary>
2122 /// Gets or sets the absolute path to the program to debug.
2223 /// </summary>
24+ [ Obsolete ( "This property has been deprecated in favor of the Script property." ) ]
2325 public string Program { get ; set ; }
2426
27+ /// <summary>
28+ /// Gets or sets the absolute path to the script to debug.
29+ /// </summary>
30+ public string Script { get ; set ; }
31+
2532 /// <summary>
2633 /// Gets or sets a boolean value that indicates whether the script should be
2734 /// run with (false) or without (true) debugging support.
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ protected async Task HandleLaunchRequest(
130130 // Set the working directory for the PowerShell runspace to the cwd passed in via launch.json.
131131 // In case that is null, use the the folder of the script to be executed. If the resulting
132132 // working dir path is a file path then extract the directory and use that.
133- string workingDir = launchParams . Cwd ?? launchParams . Program ;
133+ string workingDir = launchParams . Cwd ?? launchParams . Script ?? launchParams . Program ;
134134 workingDir = PowerShellContext . UnescapePath ( workingDir ) ;
135135 try
136136 {
@@ -167,7 +167,7 @@ protected async Task HandleLaunchRequest(
167167 // params so that the subsequent configurationDone request handler
168168 // can launch the script.
169169 this . noDebug = launchParams . NoDebug ;
170- this . scriptPathToLaunch = launchParams . Program ;
170+ this . scriptPathToLaunch = launchParams . Script ?? launchParams . Program ;
171171 this . arguments = arguments ;
172172
173173 // The order of debug protocol messages apparently isn't as guaranteed as we might like.
You can’t perform that action at this time.
0 commit comments