【问题标题】:Remote debug node.js app, Chrome DevTools inspected device is missing远程调试 node.js 应用,Chrome DevTools 检查设备丢失
【发布时间】:2020-04-14 05:33:04
【问题描述】:

重现步骤:

1. 我在远程服务器 (Ubuntu) 上运行 node.js (node@12.14.0) 应用程序

> node --inspect app.js
Debugger listening on ws://127.0.0.1:9229/12345678-1234-1234-1234-123456789

2.在本地(Windows 10)上配置了 SSH 隧道

点击“打开”,我看到了,我在哪里输入了我的密码

Using username "user".
user@site.com's password:
_

3. 配置了 Chrome (URI chrome://inspect/#devices) 目标发现设置

4.最后我在远程目标上看不到任何设备

但期待这样的事情

5. netstat -a -n |服务器上的 grep 9221 返回

我做错了什么?我如何获得目标?

类似主题: 1.How to debug remote node.js app using chrome devtools 2.

【问题讨论】:

    标签: node.js remote-debugging


    【解决方案1】:

    以下对我有用

    P.1 以 root 用户运行 node.js 应用程序

    > node --inspect-brk app.js
    

    P.2 对于隧道使用 Windows PowerShell 和以下行

    ssh -N -L 9221:localhost:9229 root@site.com
    

    【讨论】:

      猜你喜欢
      • 2018-10-18
      • 2015-07-08
      • 2020-03-31
      • 2019-05-05
      • 2019-08-14
      • 2017-09-08
      • 1970-01-01
      • 2020-05-06
      • 2020-08-21
      相关资源
      最近更新 更多