sails.js - How to execute the break points when debug in Node.js? -


i using electron (front-end) , node.js (sails back-end). both in typescript(es6).

i want debug sails application controller.

i selected break points in application (back-end) using webstorm.

enter image description here

gulp run configuration not supposed used node application debugging - designed run/debug gulp tasks. debug node.js application, need create node.js run configuration (see http://www.sullivansoftdev.com/blog/2014/04/12/debugging-sails-applications-with-webstorm/ hints)

if still prefer using gulp start server, make sure server process started --debug-brk (for node version <= 6.x) or --inspect-brk , use either node.js remote (node <= 6.x) or chromium remote (node.6.x) run configuration attach debugger.

like:

var gulp = require('gulp'); var exec = require('child_process').exec;  gulp.task('server', function (cb) {   exec('node --debug-brk=5858 app.js', function (err, stdout, stderr) { ... 

run server task, select node.js remote/chromium remote run configuration , hit debug


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -