เหตุใด URL ที่มี chrome-devtools: // เปิด devtools ไม่ได้
Aug 21 2020
ฉันมีเซิร์ฟเวอร์ nodejs ที่ทำงานด้วย --inspect
เมื่อฉันดูข้อมูลเมตาที่ (พอร์ตนักเทียบท่า) http://10.0.3.6:4080/json/list ฉันได้รับสิ่งต่อไปนี้:
// 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 แทน:
Your search - chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=10.0 ... - did not match any documents.
ฉันจะทำให้ chrome โหลด devtoolsFrontendUrl ใน Devtools Node Inspector ได้อย่างไร
คำตอบ
JackMurphy Aug 21 2020 at 19:09
ดูเหมือนว่าทั้งโครเมี่ยมและโปรเจ็กต์โหนดจะอัปเดตชื่อโปรโตคอลจากchrome-devtoolsเป็นdevtools
การอัปเดตจากโหนด 10 เป็นโหนด 14 ทำให้ฉันได้ผลลัพธ์ดังต่อไปนี้ ...
// 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"
}
]