Skip to content
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

Allow upgrading to a launch config from a terminal command #150460

Closed
deostroll opened this issue May 26, 2022 · 5 comments
Closed

Allow upgrading to a launch config from a terminal command #150460

deostroll opened this issue May 26, 2022 · 5 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@deostroll
Copy link

For running a nodejs app, I would have set environment variables in my terminal session. Later I decide to debug it, but I have to open a separate JavaScript Debug Terminal and repeat the process of setting environment variables.

There should be a way to convert an existing, say, powershell terminal, to a JavaScript Debug Terminal, so that I don't have to repeat setting my env variables again.

@deostroll deostroll changed the title Elevate a standard terminal to JavaScript Debug Terminal Feature Request: Elevate a standard terminal to JavaScript Debug Terminal May 26, 2022
@roblourens roblourens assigned connor4312 and unassigned roblourens May 26, 2022
@connor4312
Copy link
Member

connor4312 commented Jun 6, 2022

Hm, interesting idea. We use environment variables to hook up debugging to VS Code. The difficulty with changing them on the fly is that dumping commands to change environment variables for the terminal is both difficult and unsafe. This is why when changing variables (e.g. when you change auto attach modes) terminals require a relaunch to get them to apply.

One option we could take is provide a command that could be run in the terminal, like code-toggle-js-debug (maybe wordy...) added to the PATH for embedded terminals.

@connor4312 connor4312 added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Jun 6, 2022
@connor4312 connor4312 added this to the Backlog milestone Jun 6, 2022
@connor4312 connor4312 added the under-discussion Issue is under discussion for relevance, priority, approach label Jun 6, 2022
@connor4312
Copy link
Member

connor4312 commented Aug 3, 2022

I think the way I want to approach this scenario is to have a context menu action on shell commands that involve Node.js processes to "Save at launch configuration" (in this menu here, with shell integration on)

image

I think that accomplishing the goal of wanting to "upgrade" from a normal shell into a debug environment, and also makes setting up launch configs quite easy.

cc @Tyriar / @meganrogge

@connor4312 connor4312 changed the title Feature Request: Elevate a standard terminal to JavaScript Debug Terminal Allow upgrading to a launch config from a terminal command Aug 3, 2022
@Tyriar
Copy link
Member

Tyriar commented Aug 4, 2022

This is blocked on #151937 feature work

@Tyriar
Copy link
Member

Tyriar commented Aug 10, 2022

To elaborate on my comment above, I'm not a fan of adding a persistent "create launch.json" to the command decoration menu. Instead I think we should add it to the contextual menu as that's the purpose we're aiming to have for that (high quality suggestions).

@connor4312
Copy link
Member

The generic path for this now is copilot-debug: https://code.visualstudio.com/updates/v1_96#_debugging-with-copilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

4 participants