为什么没有chrome-devtools://的网址打开devtools? [英] Why doesn't a url with chrome-devtools:// open the devtools?

查看:383
本文介绍了为什么没有chrome-devtools://的网址打开devtools?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行--inspect的nodejs服务器

I have a nodejs server running with --inspect

当我在(docker端口)查看元信息时 http://10.0.3.6:4080 /json/list 我得到以下信息:

When i look at the meta information at (docker port) http://10.0.3.6:4080/json/list i get the following:

// 20200821141205
// http://10.0.3.6:4080/json/list

[
  {
    "description": "node.js instance",
    "devtoolsFrontendUrl": "chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=10.0.3.6:4080/15d3e459-3f00-442f-b442-a35cea47d811",
    "devtoolsFrontendUrlCompat": "chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=10.0.3.6:4080/15d3e459-3f00-442f-b442-a35cea47d811",
    "faviconUrl": "https://nodejs.org/static/images/favicons/favicon.ico",
    "id": "15d3e459-3f00-442f-b442-a35cea47d811",
    "title": "src/server.ts",
    "type": "node",
    "url": "file:///app/src/server.ts",
    "webSocketDebuggerUrl": "ws://10.0.3.6:4080/15d3e459-3f00-442f-b442-a35cea47d811"
  }
]

我希望打开devToolsFrontendUrl会打开chrome devtools页面.相反,它尝试执行Google查询:

I would expect that opening the devToolsFrontendUrl would open the chrome devtools page. It instead tries to execute a google query:

Your search - chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=10.0 ... - did not match any documents.

如何让Chrome在Devtools节点检查器中加载devtoolsFrontendUrl?

How do i make chrome load the devtoolsFrontendUrl in the Devtools Node Inspector?

推荐答案

看起来chrome和节点项目都将其协议名称从chrome-devtools更新为devtools

It looks like both chrome and the node projects updated their protocol name from chrome-devtools to devtools

从节点10更新到节点14给了我以下结果...

Updating from node 10 to node 14 gave me the following results...

// 20200821150718
// http://10.0.3.6:4080/json

[
  {
    "description": "node.js instance",
    "devtoolsFrontendUrl": "devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=10.0.3.6:4080/50b21fd5-04d4-407a-8e1e-cb1937e0419b",
    "devtoolsFrontendUrlCompat": "devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=10.0.3.6:4080/50b21fd5-04d4-407a-8e1e-cb1937e0419b",
    "faviconUrl": "https://nodejs.org/static/images/favicons/favicon.ico",
    "id": "50b21fd5-04d4-407a-8e1e-cb1937e0419b",
    "title": "src/server.ts",
    "type": "node",
    "url": "file:///app/src/server.ts",
    "webSocketDebuggerUrl": "ws://10.0.3.6:4080/50b21fd5-04d4-407a-8e1e-cb1937e0419b"
  }
]

这篇关于为什么没有chrome-devtools://的网址打开devtools?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆