我正在尝试调试Intellij (IDEA)的咕噜声。技术有: NodeJS、快递、AngularJS。
问题:调试器不会停止在断点上。
我很高兴听到你的想法。
配置选项卡:
节点解释器:C:\ProgramFiles\nodejs\node.exe
Javscript文件: C:\Usersuser\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt
Browser / Live编辑选项卡:
http://localhost:3000/下面是Gruntfile.js:
var path = require('path');
module.exports = function (grunt) {
grunt.initConfig({
express: {
dev: {
options: {
script: 'server.js'
}
},
},
watch: {
html: {
files: [ '**/*.html'],
options: {
livereload: true
}
},
server: {
files: [ 'server.js'],
tasks: ['express:dev'],
options: {
livereload: true,
spawn: false // Without this option specified express won't be reloaded
}
},
js: {
files: [ '**/*.js'],
options: {
livereload: true
}
}
},
open: {
express: {
// Gets the port from the connect configuration
path: 'http://localhost:3000'
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-express-server');
grunt.loadNpmTasks('grunt-open');
grunt.registerTask('default', ['express:dev', 'watch' ])};
发布于 2014-02-25 14:58:38
刚刚尝试了一个示例Angular+Express应用程序作为Grunt任务运行。我用过你的Gruntfile.js (没变)。我的Node.js运行配置看起来像折叠:
配置选项卡:节点解释器: C:\Program文件: C:\Usersuser\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt工作目录:我的项目根目录- Gruntfile.js所在的文件夹
Live选项卡:启用启动后启用JavaScript调试器
http://localhost:3000我在我的controllers.js中设置了断点,并在角度代码中的调试器=>断点中按预期运行上面的配置。)我的服务器代码中的断点不要:)
为了使服务器端代码中的断点正常工作,我执行了以下操作:
表达式:{ dev:{ options:{ script:'server.js',调试: true } },
https://stackoverflow.com/questions/21957411
复制相似问题