首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何调试nodejs

如何调试nodejs

作者头像
前端GoGoGo
发布2018-08-27 10:46:48
8320
发布2018-08-27 10:46:48
举报

使用node-inspector来调试node

安装

npm install -g node-inspector

启动

  • 启动要调试的项目: node --debug 文件名
  • 启动node-inspector:node-inspector --web-port=11111 默认监听端口为 8080
  • 用chrome浏览器打开 http://127.0.0.1:11111/debug?port=5858 选择文件打断点之类

一些选项

         Option             Default                  Description
    --help            |                 |   Print information about options
    --web-port        |      8080       |   Port to host the inspector
    --web-host        |    127.0.0.1    |   Host to listen on
    --debug-port      |      5858       |   Port to connect to the debugging app
    --save-live-edit  |      false      |   Save live edit changes to disk (update the edited files)
    --hidden          |       []        |   Array of files to hide from the UI
                      |                 |   Breakpoints in these files will be ignored

更多

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2013.09.24 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 使用node-inspector来调试node
    • 安装
      • 启动
        • 一些选项
          • 更多
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档