Deno project suddenly won't launch in VS Code
I haven't changed anything in my project or environment except having done a brew update/upgrade, which may have updated Deno. Now when I try to launch my server code in VS Code, it doesn't run. There are no error messages or other indications of trouble, and the server runs fine if I launch it from the command line. I tried re-intializing the working folder with the Deno plug-in, but this did not change anything. This setup had been working for months. Any ideas?
6 Replies
BTW this is Deno 1.44.2 under Mac OS 14.5, VS Code 1.90.1
I'm sorry to hear that you're experiencing issues with launching your Deno project in VS Code. I wasn't able to find the answer to your problem in the official Deno documentation.
From the information you've provided, it seems like the issue might be related to the Deno extension for VS Code or the VS Code configuration itself, rather than your Deno installation or your project code, especially since you mentioned that the server runs fine from the command line.
Here are a few things you might want to check or try:
1. Ensure that the Deno extension for VS Code is up to date.
2. Check your
.vscode/settings.json
file for any Deno-related configurations that might be incorrect or outdated.
3. Verify that the path to the Deno executable is correctly set in the VS Code settings if it's specified.
4. Look at the "Output" panel in VS Code when you try to launch the server to see if there are any Deno-related messages.
5. Try disabling other VS Code extensions to rule out any conflicts.
Please note that this advice is not based on the Deno documentation, and I recommend double-checking the accuracy of the advice given. If the issue persists, you might want to seek help from the community or the maintainers of the Deno extension for VS Code.sorry for stupid question... you said it works only when you run it in command line.
Now i am interesting which way also do you use?🤨
I believe I may currently be experiencing a related issue.
OS: Windows 11 Home 23H2
IDE: Visual Studio Code
Deno Version: 1.44.2
v8: 12.6.228.9
TypeScript: 5.4.5
When I attempt to use the auto-generated VS Code launch configuration to have in-built debugging and breakpoints, the program terminates immediately with the following output:
I have reinstalled Deno several times, following https://docs.deno.com/runtime/manual/, to no avail.
Notably, running
deno run -A main.ts
in the terminal integrated within VS Code works as expected and does not output this error, and removing the --inspect-wait
argument from the launch configuration (shown below) also removes the error, though it also makes VS Code completely incapable of debugging
Usually I press the "Launch Program" button at the top of the "Run & Debug" page in VS Code.
These problems are due to a bug in the latest Deno release. From a Reddit post: "A bug snuck into v1.44.2 release that prevents debugger from working correctly. It's already fixed in canary. You can downgrade to v1.44.1 for the time being and wait for v1.44.3 release this week."
i see. i only used chrome debug with 1.44.1 , few weeks ago. After upgrade to 1.44.2, i did not debug anything. only coding