Enable JavaScript debugging with IntelliJ and source maps -


i using intellij 14.1.4 creating javascript application. debugging, fire webserver using gulp. fire javascript debugging , connect chrome (via plugin). can debug "normal" javascript way when using source maps (created browserify), intellij not trigger break points anymore. if use chrome's debugging tools, works expected intellij not seem being able translate break points.

is there way make work? have spent quite time researching issue , far understand it, intellij supports source maps. also, able debug gwt generated javascript using approach uses source maps, well.

update: seems there current issue problem. if workarround know, happy hear solution.


the answer below solves problem. here how set gulp build:

bundler.bundle()     .pipe(exorcist('./build/bundle.js.map', null, null, '../src')) 

with ./build being build folder , ../src being root of javascript source files, relative build folder.

the current workaround use exorcist generate external source maps. can set base path evaluate paths -b parameter, more info in docs.

as example, here's call watchify looks like:

bin/watchify -d -v -p [tsify --target es5] -t debowerify js/tests/karma/**/*.ts -o 'bin/exorcist -b "js/compiled/" js/compiled/tests.js.map > js/compiled/tests.js' 

be aware plugins , transforms might output weird paths when piped together; if sourcemaps don't work, make sure browserify or watchify output path properly. once had browserify output "../../js/tests/karma/unit/js/tests/karma/unit/calculator.spec.ts" instead of "../../js/tests/karma/unit/calculator.spec.ts", causing maps useless.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -