node-inspector
:$ npm install -g node-inspector
配置gulp,gulp能够用 gulp-node-inspector 或 用gulp-shell直接启动node-inspector命令。css
gulp.task 'server',()-> nodemon({ nodeArgs: ['--debug'] #须要开启调试 script: './server.coffee' ext: 'coffee css jade html json' ignore: ["assets/**/*", "public/**/*.*", "test/**/*"], }) #能够设置调试端口,忽略文件(夹),调试模式,是否保存浏览试更改的内容,详细应用可查看:https://www.npmjs.com/package/node-inspector gulp.task 'startDebug', shell.task ['node-inspector &'] gulp.task 'debug',["server"], ()-> gulp.start 'startDebug'
打开:http://127.0.0.1:8080/?port=5858 就能够和前端代码同样调试了.html