Cod*_*deQ 2 node-inspector mean-stack meanjs
我克隆了meanjs并在启动时使用npm install和grunt运行它显示调试器在端口5858上侦听,但是当我打开chrome时
本地主机:8080 /调试端口= 5858
它显示网页不可用.有什么我需要做的让node-inspector调试器为meanjs工作?
好的,如果您正在使用Yeoman Generator(meanjs.org)中的Gruntfile,那么grunt debug只需grunt在控制台中运行即可.http://localhost:1337/debug?port=5858如果您具有以下默认设置,则可以使用节点检查器:
watch: {
serverViews: {
files: watchFiles.serverViews,
options: {
livereload: true
}
},
serverJS: {
files: watchFiles.serverJS,
tasks: ['jshint'],
options: {
livereload: true
}
},
clientViews: {
files: watchFiles.clientViews,
options: {
livereload: true,
}
},
clientJS: {
files: watchFiles.clientJS,
tasks: ['jshint'],
options: {
livereload: true
}
},
clientCSS: {
files: watchFiles.clientCSS,
tasks: ['csslint'],
options: {
livereload: true
}
}
},
nodemon: {
dev: {
script: 'server.js',
options: {
nodeArgs: ['--debug'],
ext: 'js,html',
watch: watchFiles.serverViews.concat(watchFiles.serverJS)
}
}
},
'node-inspector': {
custom: {
options: {
'web-port': 1337,
'web-host': 'localhost',
'debug-port': 5858,
'save-live-edit': true,
'no-preload': true,
'stack-trace-limit': 50,
'hidden': []
}
}
},
concurrent: {
default: ['nodemon', 'watch'],
debug: ['nodemon', 'watch', 'node-inspector'],
options: {
logConcurrentOutput: true,
limit: 10
}
}
Run Code Online (Sandbox Code Playgroud)
主要的cli任务在gruntfile的底部定义:
// Default task(s).
grunt.registerTask('default', ['lint', 'concurrent:default']);
// Debug task.
grunt.registerTask('debug', ['lint', 'concurrent:debug']);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2387 次 |
| 最近记录: |