我正在尝试使用 Deno 2.0 在 VS Code 中调试 Next.js 项目。
但是,所有断点都不起作用。他们只是被忽视了。
我的 .vscode/launch.json 在哪里:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"request": "launch",
"name": "Launch Program",
"type": "node",
"program": "npm:next",
"args": ["dev"],
"cwd": "${workspaceFolder}",
"env": {},
"runtimeExecutable": "/opt/homebrew/bin/deno",
"runtimeArgs": [
"run",
"--unstable",
"--inspect-brk",
"--allow-all"
],
"attachSimplePort": 9229,
"sourceMaps": true,
"console": "integratedTerminal"
}
]
}
一切似乎都正常:
Debugger listening on ws://127.0.0.1:9229/ws/89519193-15c2-42e4-b0d7-8eec85e2b3cc
Visit chrome://inspect to connect to the debugger.
Deno is waiting for debugger to connect.
Debugger session started.
▲ Next.js 14.2.15
- Local: http://localhost:3000
- Environments: .env
✓ Starting...
✓ Ready in 1859ms
最新版本的 VS Code (1.95.1) 中的调试已损坏。 (https://github.com/microsoft/vscode/issues/232651)。 您需要停用自动更新并安装 1.94.2 版本,直到他们修复它(1.95.2?)