fcrozatier
fcrozatier•5d ago

error: unexpected argument --experimental-network-inspection when trying to debug

I'm using the following vscode launch.json config
{
"name": "deno run",
"request": "launch",
"type": "node",
"runtimeExecutable": "deno",
"cwd": "${workspaceFolder}",
"program": "${file}",
"runtimeArgs": [
"run",
"--unstable",
"--inspect-wait",
"--allow-all"
],
"env": {},
"attachSimplePort": 9229
},
{
"name": "deno run",
"request": "launch",
"type": "node",
"runtimeExecutable": "deno",
"cwd": "${workspaceFolder}",
"program": "${file}",
"runtimeArgs": [
"run",
"--unstable",
"--inspect-wait",
"--allow-all"
],
"env": {},
"attachSimplePort": 9229
},
which has been working fine for the last year, but now I'm getting the following error when trying to do breakpoint debugging with it:
/usr/local/bin/deno --experimental-network-inspection run ./effect-system/run.ts error: unexpected argument '--experimental-network-inspection' found tip: to pass '--experimental-network-inspection' as a value, use '-- --experimental-network-inspection' Usage: deno [OPTIONS] [COMMAND] Process exited with code 1
So it seems something is adding the --experimental-network-inspection flag I've attached a short clip showing the problem. Any ideas how to solve this? Thanks!
5 Replies
fcrozatier
fcrozatierOP•5d ago
I've reinstalled Deno and the extension and still have the problem. I think this could have to do with vscode, I remember seeing the update screen earlier today before I had the problem for the first time 😬 So I have found a workaround If I use an attach request instead of a launch request I can debug both inside scripts and tests. The dx was a bit better with the launch request as I could do everything from the editor, now I must connect the debugger via the command line
{
"type": "node",
"request": "attach",
"name": "Attach to Deno",
"port": 9229,
"restart": false,
"timeout": 10000,
"localRoot": "${workspaceFolder}",
"remoteRoot": null
}
{
"type": "node",
"request": "attach",
"name": "Attach to Deno",
"port": 9229,
"restart": false,
"timeout": 10000,
"localRoot": "${workspaceFolder}",
"remoteRoot": null
}
bartlomieju
bartlomieju•5d ago
Ugh, it looks like VSCode is adding that automatically... Could you please open an issue in Deno repo - we'll reach out to VSCode folks to try and fix it
bartlomieju
bartlomieju•3d ago
Thanks!
fcrozatier
fcrozatierOP•3d ago
SOLUTION: To remove the flag add "experimentalNetworking": "off" in your launch config https://github.com/microsoft/vscode-js-debug/issues/2220

Did you find this page helpful?