| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Adds a new option `temporaryConsoleWindowActionOnDebugEnd` to both the attach and launch configurations which can be used to specify what happens with the temporary integrated console when a debug session ends. The option can be set to `keep`, current behaviour and default, that will keep the active terminal as the temporary console. It can be set to `close` which closes the terminal and removes it from the selection pane or `hide` which keeps the terminal window alive but changes the active terminal to the previous one before the debug session started.
There was a problem hiding this comment.
This PR adds a new configuration option temporaryConsoleWindowActionOnDebugEnd that controls the behavior of temporary console windows when PowerShell debug sessions end. The feature provides three options: "keep" (default, maintains current behavior), "close" (removes the terminal), and "hide" (restores the previous active terminal).
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/features/DebugSession.ts | Implements the core logic for handling terminal state changes and debug session event listening |
| package.json | Defines the new configuration schema with enum values and descriptions for both attach and launch configurations |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM and tested working. Thanks Jordan.
Sorry, something went wrong.
|
Patrick and I just have the question: what do we need hide for, is there any user request for that or was it just "an option available?" Closing and keeping seem to be enough (and we'd almost err on closing being the correct default, and that's perhaps a bug that it's not what currently happens). |
Sorry, something went wrong.
|
Hide is useful if you want the active window to go back to what was there before it was launched but still want the temp console window available to either see the history or in a launch scenario to run further commands in that runspace state, e.g. get vars, run functions defined in the launch script, etc. The reason I didn't go with close (or hide) by default is one that's not how it works today and a user may still want to go back in the history/output to see what has happened after the debug session ended. I also thought it might be a bit confusing if a launch session had a different default to attach so decided to just align them to the same default. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Adds a new option temporaryConsoleWindowActionOnDebugEnd to both the attach and launch configurations which can be used to specify what happens with the temporary integrated console when a debug session ends. The option can be set to keep, current behaviour and default, that will keep the active terminal as the temporary console. It can be set to close which closes the terminal and removes it from the selection pane or hide which keeps the terminal window alive but changes the active terminal to the previous one before the debug session started.
Issue for this feature was opened under PowerShell/PowerShellEditorServices#2247 but the actual implementation needs to be done here.
PR Checklist