question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

inspect or debug flag example?

See original GitHub issue

Continuing from https://github.com/remy/nodemon/issues/1114

I’ve tried:

new NodemonPlugin({ debug: true})
new NodemonPlugin({ inspect: true})
new NodemonPlugin({ inspect: 9229 }) 
new NodemonPlugin({ nodeArgs: { debug: true } })
new NodemonPlugin({ nodeArgs: { inspect: true } })
new NodemonPlugin({ nodeArgs: { inspect: 9229 } })

But none of them seem to serve the debugger stuff. What’s the right way?

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Izhakicommented, Oct 23, 2017

Looking at nodemon’s tests:

  it('should support --debug=XXXX', function () {
    var options = exec({ script: 'app.js', nodeArgs: [ '--debug=9999' ]});
    var cmd = toCmd(options);
    assert(cmd.string === 'node --debug=9999 app.js', cmd.string);
    assert(options.exec === 'node');
    assert(options.ext.indexOf('js') !== -1);
  });

So have you tried:

new NodemonPlugin({ nodeArgs: [ '--debug=9999' ] })

It seems to do the right thing on the plugin tests:

[nodemon] starting `node --debug=9999 ../../../../../private/var/folders/wc/3ghj3xvj4mv9k4b_6ssk6_g80000gn/T/tmp-20561J5vh8ynId9nV/dist/server.js --port 4096`
0reactions
Izhakicommented, Jul 18, 2020

@DivekJohns Not sure what is being asked or what you are trying to achieve. What I don’t understand:

Is this your plugin config?

new NodemonPlugin({ nodeArgs: [ "--debug=9999" ] }), // not working

What’s this:

[nodemon] starting ts-node ./src/main.ts build\main.js
  • Where is ts-node coming from?
  • Why both ./src AND build\main.js`?

Could you kindly clarify?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging - Getting Started - Node.js
Spawn child process to run user's script under --inspect flag; and use main process to run CLI debugger. Listen on port port (default:...
Read more >
Debugging in the browser - The Modern JavaScript Tutorial
Before writing more complex code, let's talk about debugging. Debugging is the process of finding and fixing errors within a script.
Read more >
Debugging in Visual Studio Code
Variables can be inspected in the VARIABLES section of the Run and Debug view or by hovering over their source in the editor....
Read more >
Stepping through code and inspecting variables to isolate bugs
Find the cause of your bugs by watching variables change as you step through your source code in the debugger.
Read more >
12. Debugging Makefiles - Managing Projects with GNU Make ...
Unfortunately, there is no such thing as a makefile debugger to examine how a particular rule ... The option is supposed to suppress...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found