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

Exclude the --inspect flag #2357

Merged
merged 1 commit into from
Aug 29, 2016
Merged

Exclude the --inspect flag #2357

merged 1 commit into from
Aug 29, 2016

Conversation

simov
Copy link
Contributor

@simov simov commented Jul 6, 2016

PR: nodejs/node#6792
Merged in Node v7.0: https://nodejs.org/download/nightly/v7.0.0-nightly20160619a92089b6bd/
Short article about it: https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.cs12vrlsa
Usage:

mocha --inspect --debug-brk hello.js

A quick patch release will be greatly appreciated! Thanks!

@boneskull
Copy link
Contributor

Thanks. We can add this in v3.1.0. May need to rebase it onto master after the v3.0.0 branch is merged.

As a workaround until then, you can execute node <flags> /path/to/_mocha -- <mocha-args>

@boneskull boneskull added the type: feature enhancement proposal label Jul 7, 2016
@boneskull boneskull added this to the v3.1.0 milestone Jul 7, 2016
@boneskull
Copy link
Contributor

probably transient CI failures

@boneskull boneskull merged commit 3ff8cb6 into mochajs:master Aug 29, 2016
@SimenB
Copy link

SimenB commented Sep 14, 2016

Any chance for a release of this? 😄

@fgarcia
Copy link

fgarcia commented Sep 27, 2016

Thanks a lot!!! This feature was the best surprise I got from the latest release!

However I am curious about why --debug-brkis needed. Normally I would just type debugger in some test and wait for the debugger to reach that breakpoint.

If I just use --inspect and a debugger line, Mocha will start the debug server and run all tests without stopping. Currently I must force it to start with a breakpoint, and manually continue to reach the second breakpoint in my code.

@SimenB
Copy link

SimenB commented Sep 27, 2016

If you don't have --debug-brk you have no attached debugger, so debugger statements do nothing.

I think.

@simov
Copy link
Contributor Author

simov commented Sep 27, 2016

--debug-brk stops the node program on the first line

@fgarcia
Copy link

fgarcia commented Sep 27, 2016

@SimenB is right, I've just tested a small node example and --inspect is useless without --debug-brk OR with a debugger attached before reaching the breakpoint.

The current behaviour is the expected one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature enhancement proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants