sidorares / node-vim-debugger

node.js step by step debugging from vim
561 stars 32 forks source link

Integration with mocha #28

Open sidorares opened 10 years ago

sidorares commented 10 years ago

I often use cli debugger with mocha via mocha debug test/foo/bar. It would be great to have mocha vimdebug test/foo/bar (if possible without modification to mocha, via mocha.opts + --require )

alFReD-NSH commented 10 years ago

Just a reminder that mocha isn't the only test runner out there...

sidorares commented 10 years ago

Of course, feel free to submit PR for yours :) ( and I'm not aware of others that can spawn test + debugger )

AndrewRayCode commented 9 years ago

@sidorares have you gotten this to work with vanilla mocha? that's what i'm looking at now

sidorares commented 9 years ago

@DelvarWorld no, I haven't looked at this yet

sidorares commented 8 years ago

@DelvarWorld afaik you can start mocha tests with --debug-brk, that way workflow should be identical as documented in the readme

Seikho commented 8 years ago

You can also debug the mocha unit tests by running by debugging node_modules/mocha/bin/_mocha from your root project folder. This assumes you have mocha installed as a (dev-)dependency in your project (as it should be).

sidorares commented 8 years ago

yes, I'm just thinking about best way on how to integrate this for mocha users which would require wery little configuration ( line in mocha.opts or something similar )

Seikho commented 8 years ago

Instructions in the readme should be sufficient, in my opinion. Create a debug.js in the root project require that contains the code:

require('node_modules/mocha/bin_mocha')

Then use node-vim-inspector debug.js to get started.