I have some jest
tests for my application. Other js
sources which are used by the tests are written in js ES6
with Flow. My goal is to debug the sources used by tests. When I debug them, however, the code is in transpiled/minified form.
I tried the following:
./node_modules/.bin/babel-node debug ./node_modules/.bin/jest --runInBand
but the files are still minified (I have.babelrc
withes2015
andstage-3
presets)./node_modules/.bin/babel-node --debug ./node_modules/jest-cli/bin/jest.js --runInBand
but it hangs after launchingjest
babel-node-debug
sources displayed correctly but terminates before debugging (error described here)babel-node
with presets on the command line but it thought presets were modules (Error: Cannot find module *path*/es2015,stage-3
, similar error with space between them)node-inspector
withbabel-node debug
. Shows sources correctly but it won't let me debug (the same error as above)../node_modules/.bin/babel-node ./node_modules/bugger/bin/bugger.js -b ./node_modules/jest-cli/bin/jest.js --runInBand
(usingbugger
andbabel-node
- hangs after launchingjest
My assumption
babel-node
does generate appropriate source maps but command line debugger cannot read them and GUI tools somehow don't work. How to verify it?
My environment:
Node v6.0.0
jest v12.0.2 (dev dependency)
babel 5.8.38 (babel-core 5.8.38) (dev dependency)
Desired results
I would ultimately like to debug my files in chrome dev tools, but I wouldn't complain about the command line debugger.
I'm hesitant about installing yet more magic tools I don't know how to use, but I would be delighted to know why if I have to.
I'm new to the whole js stack so forgive me my silly questions!