node.js - WebStorm remote debugging NodeJS with Babel -


i'm running node application with:

"./node_modules/nodemon/bin/nodemon.js --ignore ./build/* ./bin/www --exec babel-node --debug=7001", 

when connect webstorm remote configuration seems work, placing breakpoint results in either them being ignored, or code stop @ different lines.

this due babel transpiling. how can that, given code transpiled @ runtime?

my .babelrc file:

{   "presets": ["es2015", "stage-2"],   "plugins": ["transform-runtime"] } 

here revelent documentation : https://blog.jetbrains.com/webstorm/2015/05/ecmascript-6-in-webstorm-transpiling/

if you’d debug code using webstorm or chrome, make sure tools you’re using generates source maps. example, when using babel only, need add "sourcemaps": "both" option .babelrc file or pass command-line argument. if you’re using babel part of more complex build process, might need addition configuration generating source maps, e.g. use gulp-sourcemaps gulp or add devtool: "source-map" option when using webpack.

source maps allow put breakpoints in original source files in ide , sure hit compiled code executed in browser.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -