Skip to content

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

Closed

Description

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.

Activity

  1. changed the title [-]Elevate a standard terminal to JavaScript Debug Terminal[/-] [+]Feature Request: Elevate a standard terminal to JavaScript Debug Terminal[/+] on May 26, 2022
  2. connor4312 commented on Jun 6, 2022

    @connor4312
    Member

    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.

  3. added
    feature-request
    debug
    on Jun 6, 2022
  4. added
    under-discussion
    on Jun 6, 2022
  5. connor4312 commented on Aug 3, 2022

    @connor4312
    Member

    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 Daniel Imms (@Tyriar) / Megan Rogge (@meganrogge)

  6. changed the title [-]Feature Request: Elevate a standard terminal to JavaScript Debug Terminal[/-] [+]Allow upgrading to a launch config from a terminal command[/+] on Aug 3, 2022
  7. Tyriar commented on Aug 4, 2022

    @Tyriar
    Contributor

    This is blocked on #151937 feature work

  8. Tyriar commented on Aug 10, 2022

    @Tyriar
    Contributor

    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).

  9. locked and limited conversation to collaborators on Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugfeature-requestunder-discussion

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions