You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix PowerShell.Debug.Start to just launch current file
This command previously used a private API
`workbench.action.debug.start` which led to bad behavior. Namely it
meant 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.
1. If there was no `launch.json` this worked accidentally in that we
resolved a default configuration to launch the current file.
2. If a working PowerShell configuration was selected, it may work as
intended, unless that configuration was to attach.
3. If any other configuration was selected, the user would be left
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).
0 commit comments