-
Notifications
You must be signed in to change notification settings - Fork 514
Feature: Add sessionName debug setting to allow different PS for temp console #5208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new temporaryIntegratedConsoleExeName
setting so users can pick a different PowerShell executable for temporary debug consoles (e.g., Windows PowerShell 5.1). It wires the new setting through the session manager, debug feature, package.json schema, and example launch configs.
- Exposed
powershellExeName
parameter increateDebugSessionProcess
and updated selection logic - Added
WindowsPowerShell
debug configuration and sample launch.json entry - Updated
package.json
with schema for the new setting
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/session.ts | Added optional powershellExeName argument and logic to pick custom exe |
src/features/DebugSession.ts | Introduced WindowsPowerShell enum, sample config, and propagation |
package.json | Defined JSON schema for temporaryIntegratedConsoleExeName and added launch snippet |
examples/.vscode/launch.json | Added example launch configuration for Windows PowerShell |
Comments suppressed due to low confidence (2)
src/session.ts:737
- The
defaultPowerShell
variable is declared but never used. Removing this unused variable will clean up the code.
let defaultPowerShell: IPowerShellExeDetails | undefined;
src/session.ts:459
- There are no tests covering the new
powershellExeName
path increateDebugSessionProcess
. Consider adding unit or integration tests to verify that custom executables are correctly discovered and invoked.
public async createDebugSessionProcess(
1f29682
to
037fb49
Compare
3ba830d
to
22ed432
Compare
@@ -440,6 +458,10 @@ export class DebugSessionFeature | |||
return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; | |||
} | |||
|
|||
if (config.sessionName) { | |||
config.createTemporaryIntegratedConsole = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only thought is that we tried to move away from "integrated console" to "extension terminal" but I am unsure how much of that name change made it to this particular feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can probably fix that up, stay tuned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I can either fix it in this PR or we commit this and I submit another PR to rename/alias createTemporaryIntegratedConsole to createTemporaryPowershellSession. Which would you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing as this was merged I will address it in separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah I didn't see it was set to auto complete.
PR Summary
We want to encourage people to use PS7 for their extension terminal, but need to give them an easy way to test and debug PowerShell 5.1 tests.
This adds a setting to enable the selection of a different PowerShell executable for the temp terminal. It also adds a launch config sample for Windows PowerShell.
Recording.2025-05-31.100611.mp4
This has the added benefit of being able to temp console other PowerShell exes, such as a latest PowerShell build.