-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"unknown error" when running Rust project on Windows #632
Comments
The error is coming from LLDB's "launch process" API, there is no further information here. Could be a missing DLL or something like that. |
Is there any way to get any further information? I can use this in other projects on the same machine, and this project runs normally if I just run cargo run in terminal |
Try Process Monitor. |
Okay I'm looking at a capture of when it happens with Process Monitor but to be honest there's a lot of information here and I'm not sure what I'm even looking for. I'm not seeing any obvious signs of an error occurring even. The executable for my project seems to exit with an exit status "-1073741515" or 0xC0000135 which seems to be STATUS_DLL_NOT_FOUND so there's a missing DLL somewhere? The last dll it loads before this occurs is vcruntime140.dll, which I think is loaded successfully? It's odd because I don't have this issue in any other project on this machine, and like I said I can run it normally just fine, it's only when running through vscode-lldb it's an issue |
Yes, looks like a missing DLL. IIRC, you should see Windows searching for a DLL file before it fails with this error, though. More tools to try: |
For posterity, Bevy recommends enabling dynamic linking, which VSCode doesn't nicely handle (see bevyengine/bevy#2589). In general, you need to update For Bevy in particular, you can add the following envvars to your
|
I can confirm that this works! I forgot that I'd enabled dynamic linking since I normally don't do that, thanks for the workaround! |
This fixed the issue for me (I'm debugging a Bevy game with dynamic linking enabled, too). Thanks a ton, @agg23! |
Can confirm this works for me also. Note that you may need to change part of the PATH value. I, for one am using the stable build, not nightly, so I had to change |
OS: Windows 10 21H1
VSCode version: 1.63.2
CodeLLDB version: 1.6.10
Compiler: rustc 1.60.0-nightly (5e57faa78 2022-01-19)
Debuggee: x86_64-windows-msvc
I have a game written in the Rust-based game engine Bevy that has been untouched for about half a year, and when I went back to it, upgrading stuff along the way, all of a sudden it would no longer run through the vscode-lldb extension. Compilation succeeds, and using cargo run on its own works just fine, but vscode-lldb fails with an unknown error in debug_session.rs, and I can't immediately tell where that error could come from in that specific file.
Verbose log
The text was updated successfully, but these errors were encountered: