Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JustinGrote
Copy link
Collaborator

@JustinGrote JustinGrote commented May 31, 2025

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.

@Copilot Copilot AI review requested due to automatic review settings May 31, 2025 16:23
@JustinGrote JustinGrote requested a review from a team as a code owner May 31, 2025 16:23
@JustinGrote JustinGrote self-assigned this May 31, 2025
@JustinGrote JustinGrote requested a review from andyleejordan May 31, 2025 16:24
@JustinGrote JustinGrote added Issue-Enhancement A feature request (enhancement). Area-Debugging labels May 31, 2025
Copy link

@Copilot Copilot AI left a 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 in createDebugSessionProcess 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 in createDebugSessionProcess. Consider adding unit or integration tests to verify that custom executables are correctly discovered and invoked.
public async createDebugSessionProcess(

@JustinGrote JustinGrote force-pushed the justingrote/feature/pickTemporaryConsole branch 2 times, most recently from 1f29682 to 037fb49 Compare May 31, 2025 16:37
@JustinGrote JustinGrote force-pushed the justingrote/feature/pickTemporaryConsole branch from 3ba830d to 22ed432 Compare May 31, 2025 16:57
@JustinGrote JustinGrote changed the title Feature: Add temporaryIntegratedConsoleExeName debug setting to allow different PS for temp console. Feature: Add sessionName debug setting to allow different PS for temp console May 31, 2025
@JustinGrote JustinGrote enabled auto-merge (squash) June 1, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Debugging Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant