I can do:
- I can test node.js modules using nodeunit.
- I can debug my node.js express site using node inspector.
But how to debug nodeunit test using node inspector?
I tried, but not working:
nodeunit --debug myNodeUnitModule_test.js
It's not working.- I tried to install nodebug.
And used it like this:
nodebug /usr/local/bin/nodeunit myNodeunit_test.js
But it's not working neither on ubuntu (No such file or directory
) nor on mac (env: node\r: No such file or directory
)
Almost works node --debug /usr/local/bin/nodeunit ./routes/edit/bodyTelInfoArraysToObject_test.js
where /usr/local/bin/nodeunit
is path taken by command which nodeunit
got output:
debugger listening on port 5858
and test executed there.
But I can't jump in debuggin: when I open url localhost:8080
in chrome to watch debugging:
- first load I see empty file list
- second load: page not found.
On my nodeunit test I wrote debugger
to stop on debug there.
But nothing.