Nodejs chrome 调试配置 webcrt学习笔记
2014-08-21 12:58
197 查看
webcrt学习笔记
nodejs 安装和基本学习 参照《node.js开发指南.pdf》,其中遇到过 express 版本不同导致 书中例子不能正常运行,后来(为了正常运行)去除了一下功能;
之后又找来了 “expressSimpleBlog-master” 的项目做参考学习。现在为了 调试和学习webrtc 相关的内容,遇到了 配置nodejs调试的问题;
以下内容记录设置过程中的问题和有效地方法,内容来之网上收索。
Nodejs chrome 调试配置
转的 http://www.fwind.me/blog/617.html
2.启动node-inspector.
//默认端口
➜ ~ node-inspector
Node Inspector v0.5.0
info - socket.io started
Visit http://127.0.0.1:8080/debug?port=5858 to start debugging.
//指定端口
➜ ~ node-inspector --web-port=6000
Node Inspector v0.5.0
info - socket.io started
Visit http://127.0.0.1:6000/debug?port=5858 to start debugging.
3.启动要被调试的程序
//在有断点的地方,暂停.
➜ action-server git:(session) ✗ node --debug app.js
debugger listening on port 5858
info - socket.io started
------>Action-Server listening on port 9000
//程序启动开始就暂停,手动向下执行.
➜ action-server git:(session) ✗ node --debug-brk app.js
debugger listening on port 5858
4.在程序中打标记断点.
this.get_logout = function(req,res){
req.session.user = null;
debugger;//断点
res.send('logout ok');
}
nodejs 安装和基本学习 参照《node.js开发指南.pdf》,其中遇到过 express 版本不同导致 书中例子不能正常运行,后来(为了正常运行)去除了一下功能;
之后又找来了 “expressSimpleBlog-master” 的项目做参考学习。现在为了 调试和学习webrtc 相关的内容,遇到了 配置nodejs调试的问题;
以下内容记录设置过程中的问题和有效地方法,内容来之网上收索。
Nodejs chrome 调试配置
转的 http://www.fwind.me/blog/617.html
通过node-inspector模块在chrome上调试nodejs程序.
1.安装node-inspector模块.1 | sudo npm install -g node-inspector |
//默认端口
➜ ~ node-inspector
Node Inspector v0.5.0
info - socket.io started
Visit http://127.0.0.1:8080/debug?port=5858 to start debugging.
//指定端口
➜ ~ node-inspector --web-port=6000
Node Inspector v0.5.0
info - socket.io started
Visit http://127.0.0.1:6000/debug?port=5858 to start debugging.
1 2 3 4 5 6 7 8 9 10 11 | //默认端口 ➜ ~ node-inspector Node Inspector v0.5.0 info - socket.io started Visit http://127.0.0.1:8080/debug?port=5858 to start debugging. //指定端口 ➜ ~ node-inspector --web-port=6000 Node Inspector v0.5.0 info - socket.io started Visit http://127.0.0.1:6000/debug?port=5858 to start debugging. |
//在有断点的地方,暂停.
➜ action-server git:(session) ✗ node --debug app.js
debugger listening on port 5858
info - socket.io started
------>Action-Server listening on port 9000
//程序启动开始就暂停,手动向下执行.
➜ action-server git:(session) ✗ node --debug-brk app.js
debugger listening on port 5858
1 2 3 4 5 6 7 8 9 | //在有断点的地方,暂停. ➜ action-server git:(session) ✗ node --debug app.js debugger listening on port 5858 info - socket.io started ------>Action-Server listening on port 9000 //程序启动开始就暂停,手动向下执行. ➜ action-server git:(session) ✗ node --debug-brk app.js debugger listening on port 5858 |
this.get_logout = function(req,res){
req.session.user = null;
debugger;//断点
res.send('logout ok');
}
1 2 3 4 5 | this.get_logout = function(req,res){ req.session.user = null; debugger;//断点 res.send('logout ok'); } |
相关文章推荐
- MAC OS 下配置NODEJS 开发环境及调试
- chrome 调试 nodejs
- 本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试
- 本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试
- nodejs 安装配置和调试
- nodejs学习日志2--配置调试环境
- phpStorm9.0 +xampp+chrome php调试环境配置!
- 本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试
- PHPStorm + Homestead + Xdebug + Chrome Xdebug Helper 调试配置
- 开启php的xdebug扩展及phpstorm配置xdebug,chrome调试插件组合
- Chrome调试nodejs
- 利用webstorm 或 node-inspector + chrome 调试nodejs项目
- phpStorm9.0 +xampp+chrome php调试环境配置!
- 本地环境 XAMPP+phpStorm+XDebug+chrome 配置和断点调试
- 本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试
- webstorm 配置supervisor 调试nodejs
- xampp结合chrome和eclipse调试php的配置步骤
- 本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试 注册方法
- WebStorm中配置调试Nodejs项目
- phpstorm+xdebug+chrome helper配置php断点调试