Stokestack
Stokestack•6mo ago

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
Stokestack
StokestackOP•6mo ago
BTW this is Deno 1.44.2 under Mac OS 14.5, VS Code 1.90.1
Deno AI Helper
Deno AI Helper•6mo ago
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.
cococore
cococore•6mo ago
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?🤨
CactusPuppy
CactusPuppy•6mo ago
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:
Debugger listening on ws://127.0.0.1:9229/ws/03e5b623-87d3-41d3-ad09-45049282be46
Visit chrome://inspect to connect to the debugger.
Deno is waiting for debugger to connect.
Debugger session started.


#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 000000B4E77EB8A0
==== C stack trace ===============================

onig_get_string_end_by_callout_args [0x00007FF62E76478B+9197879]
onig_get_string_end_by_callout_args [0x00007FF62E7638C7+9194099]
onig_get_string_end_by_callout_args [0x00007FF62E7BFBEA+9571734]
onig_get_string_end_by_callout_args [0x00007FF62E7CDAE3+9628815]
onig_get_string_end_by_callout_args [0x00007FF62E7CE75E+9632010]
onig_get_string_end_by_callout_args [0x00007FF62E8C739A+10650950]
onig_get_string_end_by_callout_args [0x00007FF62E8CAF3B+10666215]
onig_get_string_end_by_callout_args [0x00007FF62E876853+10320383]
onig_get_string_end_by_callout_args [0x00007FF62E876E86+10321970]
onig_get_string_end_by_callout_args [0x00007FF62E79816D+9409305]
onig_get_string_end_by_callout_args [0x00007FF62E7B72F3+9536671]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E93C884+71524]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E951FB7+159383]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E951D8E+158830]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E93AFB2+65170]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E93AA54+63796]
onig_get_string_end_by_callout_args [0x00007FF62E7522B7+9122915]
onig_get_string_end_by_callout_args [0x00007FF62E752763+9124111]
onig_get_string_end_by_callout_args [0x00007FF62E768495+9213505]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EDBC887+4790119]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EAAD075+1580885]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EAB6569+1619017]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EA92FBB+1474203]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EA66B6B+1292875]
onig_get_string_end_by_callout_args [0x00007FF62E76D680+9234476]
onig_get_string_end_by_callout_args [0x00007FF62E730597+8984387]
onig_get_start_by_callout_args [0x00007FF62CE08241+2996345]
onig_get_capture_tree [0x00007FF62C9F66CA+4412778]
onig_get_capture_tree [0x00007FF62C9F37A7+4400711]
onig_get_capture_tree [0x00007FF62C9F1E31+4394193]
onig_get_capture_tree [0x00007FF62C98CAC6+3979622]
onig_get_capture_tree [0x00007FF62CA1CE48+4570344]
onig_get_regex_by_callout_args [0x00007FF62C45F163+236291]
node_api_get_module_file_name [0x00007FF62CB1EE55+267694]
onig_get_regex_by_callout_args [0x00007FF62C56C446+1338854]
onig_get_capture_tree [0x00007FF62CA3A75E+4691454]
onig_get_regex_by_callout_args [0x00007FF62C429BD2+17778]
node_api_get_module_file_name [0x00007FF62CB1EF79+267986]
onig_unicode_define_user_property [0x00007FF62FCC7D1C+918092]
BaseThreadInitThunk [0x00007FFDDC6A257D+29]
RtlUserThreadStart [0x00007FFDDD80AF28+40]
Debugger listening on ws://127.0.0.1:9229/ws/03e5b623-87d3-41d3-ad09-45049282be46
Visit chrome://inspect to connect to the debugger.
Deno is waiting for debugger to connect.
Debugger session started.


#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 000000B4E77EB8A0
==== C stack trace ===============================

onig_get_string_end_by_callout_args [0x00007FF62E76478B+9197879]
onig_get_string_end_by_callout_args [0x00007FF62E7638C7+9194099]
onig_get_string_end_by_callout_args [0x00007FF62E7BFBEA+9571734]
onig_get_string_end_by_callout_args [0x00007FF62E7CDAE3+9628815]
onig_get_string_end_by_callout_args [0x00007FF62E7CE75E+9632010]
onig_get_string_end_by_callout_args [0x00007FF62E8C739A+10650950]
onig_get_string_end_by_callout_args [0x00007FF62E8CAF3B+10666215]
onig_get_string_end_by_callout_args [0x00007FF62E876853+10320383]
onig_get_string_end_by_callout_args [0x00007FF62E876E86+10321970]
onig_get_string_end_by_callout_args [0x00007FF62E79816D+9409305]
onig_get_string_end_by_callout_args [0x00007FF62E7B72F3+9536671]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E93C884+71524]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E951FB7+159383]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E951D8E+158830]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E93AFB2+65170]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62E93AA54+63796]
onig_get_string_end_by_callout_args [0x00007FF62E7522B7+9122915]
onig_get_string_end_by_callout_args [0x00007FF62E752763+9124111]
onig_get_string_end_by_callout_args [0x00007FF62E768495+9213505]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EDBC887+4790119]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EAAD075+1580885]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EAB6569+1619017]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EA92FBB+1474203]
CrashForExceptionInNonABICompliantCodeRange [0x00007FF62EA66B6B+1292875]
onig_get_string_end_by_callout_args [0x00007FF62E76D680+9234476]
onig_get_string_end_by_callout_args [0x00007FF62E730597+8984387]
onig_get_start_by_callout_args [0x00007FF62CE08241+2996345]
onig_get_capture_tree [0x00007FF62C9F66CA+4412778]
onig_get_capture_tree [0x00007FF62C9F37A7+4400711]
onig_get_capture_tree [0x00007FF62C9F1E31+4394193]
onig_get_capture_tree [0x00007FF62C98CAC6+3979622]
onig_get_capture_tree [0x00007FF62CA1CE48+4570344]
onig_get_regex_by_callout_args [0x00007FF62C45F163+236291]
node_api_get_module_file_name [0x00007FF62CB1EE55+267694]
onig_get_regex_by_callout_args [0x00007FF62C56C446+1338854]
onig_get_capture_tree [0x00007FF62CA3A75E+4691454]
onig_get_regex_by_callout_args [0x00007FF62C429BD2+17778]
node_api_get_module_file_name [0x00007FF62CB1EF79+267986]
onig_unicode_define_user_property [0x00007FF62FCC7D1C+918092]
BaseThreadInitThunk [0x00007FFDDC6A257D+29]
RtlUserThreadStart [0x00007FFDDD80AF28+40]
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
{
// 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": "${workspaceFolder}/src/main.ts",
"cwd": "${workspaceFolder}",
"env": {},
"runtimeExecutable": "C:\\ProgramData\\chocolatey\\lib\\deno\\deno.EXE",
"runtimeArgs": [
"run",
"--inspect-wait",
"--allow-all"
],
"attachSimplePort": 9229,
"console": "externalTerminal"
}
]
}
{
// 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": "${workspaceFolder}/src/main.ts",
"cwd": "${workspaceFolder}",
"env": {},
"runtimeExecutable": "C:\\ProgramData\\chocolatey\\lib\\deno\\deno.EXE",
"runtimeArgs": [
"run",
"--inspect-wait",
"--allow-all"
],
"attachSimplePort": 9229,
"console": "externalTerminal"
}
]
}
Stokestack
StokestackOP•6mo ago
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."
cococore
cococore•6mo ago
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