V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
sunzongzheng
V2EX  ›  Node.js

求推荐好用的调试工具

  •  
  •   sunzongzheng · Feb 5, 2018 · 5378 views
    This topic created in 3005 days ago, the information mentioned may be changed or developed.
    自从 node-inspector 用不了之后
    一直在勉强用 node 自带的--inspect 命令调试
    有以下问题 (难道是我姿势不对?)
    - 没有 network (十分关键)
    - 经常性无法展开对象 ,如下图 (对象层次较深???)
    [http://zzsun-cdn.b0.upaiyun.com/image/C1C89C87-B22C-4E43-BE48-66AB48C693D0.png](图)

    求解有没有其他调试工具能解决以上两个问题
    sunzongzheng
        1
    sunzongzheng  
    OP
       Feb 5, 2018
    mdluo
        2
    mdluo  
       Feb 5, 2018
    网络用个抓包工具或者类似于这样的网络代理: http://anyproxy.io/

    对象的深度查看,打断点然后在 devtool 里查看,不要直接 console.log , 打断点关键字:debugger
    crysislinux
        3
    crysislinux  
       Feb 5, 2018 via Android
    我们用的 vscode,不知道你说的是不是短点调试这种。
    image72
        4
    image72  
       Feb 5, 2018
    https://github.com/Jam3/devtool

    devtool -r babel-register bin/www
    sunzongzheng
        5
    sunzongzheng  
    OP
       Feb 5, 2018
    sunzongzheng
        6
    sunzongzheng  
    OP
       Feb 5, 2018
    @mdluo 感谢回复...就是觉得抓包略麻烦一点...
    sunzongzheng
        7
    sunzongzheng  
    OP
       Feb 5, 2018
    @crysislinux vscode 有 network,console 对象可以方便展开的插件吗
    image72
        8
    image72  
       Feb 6, 2018
    $ ls -lha $(npm -g root)
    看下目录自己有没有权限
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1169 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 18:13 · PVG 02:13 · LAX 11:13 · JFK 14:13
    ♥ Do have faith in what you're doing.