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

Add support for starting a debug session from the command line #46496

Closed
fabiospampinato opened this issue Mar 25, 2018 · 4 comments
Closed

Add support for starting a debug session from the command line #46496

fabiospampinato opened this issue Mar 25, 2018 · 4 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@fabiospampinato
Copy link
Contributor

fabiospampinato commented Mar 25, 2018

I like the debugger that comes with Code, and I'd like to use it more often, but in some cases starting it up is cumbersome.

My use case:

  • I install an NPM package globally (npm i -g foo).
  • I use it a bit and for some reason I want to start up a debug session to find what exactly happens when I execute foo --flag1 in the terminal.

As far as I know the only way to do that would be to create a launch configuration file, which would look like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "/whatever/foo.js",
            "args": ["--flag1"]
        }
    ]
}

I have some problems with this approach:

  • I don't want to pollute every single project I want to debug with launch configuration files.
  • I can already do node --inspect-brk /whatever/foo.js --flag1 and with the help of NiM I immediately get the devtools open, why isn't it as easy, or easier, to do the same with Code?
  • Never mind if you also want to debug foo --flag2, go write another configuration for it.

Basically always requiring the creation of a launch configuration files leads to an awful user experience for me.

Proposed solution:

Node has the --inspect and --inspect-brk command line flags, I think similar flags should be added to Code itself. Code already comes with the --inspect-extensions and --inspect-brk-extensions flags, so the lack of those other flags seems like a major overlooking to me.

@isidorn
Copy link
Contributor

isidorn commented Mar 26, 2018

/findDuplicates

@isidorn
Copy link
Contributor

isidorn commented Mar 26, 2018

Dup of #10979
Thanks bot!

@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) labels Mar 26, 2018
@vscodebot
Copy link

vscodebot bot commented Mar 26, 2018

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Mar 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants