We should be able to enable mocha debug mode from the command line interface.
For example, when running a mocha test it should be possible to turn that running instance of mocha into debug mode:
$: mocha mytest.js --debug
Browsing through the source I can see that the library debug() is being used - https://github.com/visionmedia/debug
After adding the following statement to the /mocha.js file I was able to get the debug logs:
require('debug').enable('mocha:*');
I would assume that the option to flag debug on/off already exists but it is not documented.
If it does exists, a link in the docs page should be added describing how to enable debug mode.
If it doesn't exists I would suggest that the feature be added to the code base.
you can... 馃崟 DEBUG=mocha:* mocha test
@travisjeffery is that option documented?
it's not an option it's using https://github.com/visionmedia/debug. the reason for this is for people developing mocha so maybe something could go in the wiki, but other than that this won't be documented.
Agreed, the debug mode behavior should be added to the wiki instead of the main user documentation.
Any existing guide lines when adding wiki entries?
you could add a section in here: https://github.com/visionmedia/mocha/wiki/Developing-mocha. let me know if you do and i'll look at it
This never got added. Can it get added?
Most helpful comment
you can...
馃崟 DEBUG=mocha:* mocha test