我在 Windows 10 机器上,使用 WSL 2 (Ubuntu 18.04) 的 VS Code 尝试使用Chrome 调试器扩展,但无济于事。以下是我的launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch index.html",
"type": "chrome",
"request": "launch",
"file": "${workspaceFolder}/index.html",
"runtimeExecutable": "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
"runtimeArgs": [" --remote-debugging-port=9222"],
"userDataDir": "${workspaceFolder}/chrome",
"port": 9222
},
]
}Run Code Online (Sandbox Code Playgroud)
index.html每当我按 F5 时,我都希望看到我的页面加载到新的 Chrome 选项卡中,但它所做的只是启动一个新的空白 Chrome 窗口,然后间隔大约 15 秒弹出两个错误。
我不太关心第一个错误,它说Google Chrome cannot read and write to its data directory: <VALID-DIRECTORY-ON-MY-MACHINE>. 过去一天半我一直试图解决的是第二个错误,它说
Cannot connect to runtime process, timeout after 10000 ms - …
html web-deployment visual-studio-code windows-subsystem-for-linux chrome-debugging
html ×1