Fix PowerShell.Debug.Start
to just launch current file
#3772
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This command previously used a private API
workbench.action.debug.start
which led to bad behavior. Namely itmeant that while a PowerShell file was opened, if the triangular "Start"
button was pressed, it would start Code's currently selected launch
configuration which is often not what the user intended.
launch.json
this worked accidentally in that weresolved a default configuration to launch the current file.
intended, unless that configuration was to attach.
bewildered as to why, say, a Python debugger was started for a
PowerShell file.
Instead we call the public API to start the debugger and give it a copy
of our "Launch Current File" configuration, which is what the user
intended do when clicking the "Start" button on a PowerShell file.
This may introduce some breaking behavior if the user was relying on
this button to start their current correctly configured (and selected)
launch configuration with possible extra customizations. However, in
that the case the user can use Code's built-in options to call the
private API we were calling preivously, namely F5 or the triangular
start button in the debugger workbench (instead of our button).
Fixes #3710, cleans up some files, and reverts a bug introduced in #3518.