-
Notifications
You must be signed in to change notification settings - Fork 246
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
Unable to debug Rust with Amethyst library #410
Comments
|
Compiled your example, but could not reproduce the problem. |
|
I have the exact same issue with a different project. Trying to debug the project shown by @GuiAmPm produces the following output: OutputThe project I first discovered this issue on is https://github.com/michidk/vulkan-engine. When trying to debug that project, the exact same sequence of commands can be observed in the output console. It seems to always crash after the "setExceptionBreakpoints" command. |
|
I've included the launch.json file on the original comment just in case. @vadimcn I'm trying to compile the project locally to see if I can debug the issue myself. I can't figure out what zip file is expected to be used as |
|
@GuiAmPm: look in |
|
I wasn't very successful debugging it, because the issue seems to be happening in the adapter, but I will add more information here. When it builds this command: terminal_agent.rs#24: Error: Os { code: 10061, kind: ConnectionRefused, message: "No connection could be made because the target machine actively refused it." } I don't get why the port (or maybe the whole service?) is not available when terminal.rs#54 runs the command. I will investigate more. |
I've seen reports of this one, but was never able to reproduce it. Some windows firewall shenanigans? |
|
Also, you might not even need to build the extension. The crash most likely occurs in LLDB, so if you just redirect liblldb as described above, you should be able to debug with installed extension version. |
Changing "terminal" to any of the options we have also doesn't work. If I select "external" all I see is a CMD with the text "Press any key to continue"
Yes, this seems to be a problem not with the extension itself, but maybe the adapter or LLDB itself. More of my investigation: I filled the adapter's code with Maybe this is not the line cause we are dealing with tokyo::threads and it's stopping here by luck. To test that I did this: Now the adapter doesn't stop early! But it now it does hangs forever for some reason (probably, because the string I put makes no sense?) at this point: I unfortunatelly can't get further because I don't know how to read what exception is. This is the first time I had to deal with C++ code inside a Rust code. The results though tells me that the method |
|
Looks like a crash in MS PDB parser library. Not much I can do here, unfortunately. |
|
This was fixed sometime between my last post and now. |
|
I have the same problem. Run PowerShell as administrator. Execute the command below to register the component. Then codelldb works. |
This solved my issue, though for 1.7.0 the path to Some more symptoms of my issue, for those that also need it:
|
|
Path above still isn't quite right (missing backslash)... try: from PowerShell (admin) from cmd (admin) Fixes the issue immediately! No need to reload vscode, either. |
|
Oof, thanks, edited my reply to insert the missing |
|
Tried the This is the error: It seems to originate from |



OS: Windows 10 - 64x
VSCode version: 1.52.1
Extension version: 1.6.1
Compiler: Rustc 1.49.0
Build target: stable-x86_64-pc-windows-msvc
I'm unable to debug in Rust using the Amethyst game library. Trying to do so makes a message appear with the text: "Oops! The debug adapter has terminated abnormally."
main.rs
Cargo.toml
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": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'test_rust'",
"cargo": {
"args": [
"build",
"--bin=test_rust",
"--package=test_rust"
],
"filter": {
"name": "test_rust",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'test_rust'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=test_rust",
"--package=test_rust"
],
"filter": {
"name": "test_rust",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
Debug log
Running `cargo build --bin=test_rust --package=test_rust --message-format=json`... Compiling test_rust v0.1.0 (E:\source\test_rust) Finished dev [unoptimized + debuginfo] target(s) in 2.47s Raw artifacts: { fileName: 'e:\\source\\test_rust\\target\\debug\\test_rust.exe', name: 'test_rust', kind: 'bin' } Filtered artifacts: { fileName: 'e:\\source\\test_rust\\target\\debug\\test_rust.exe', name: 'test_rust', kind: 'bin' } configuration: { type: 'lldb', request: 'launch', name: "Debug executable 'test_rust'", args: [], cwd: '${workspaceFolder}', __configurationTarget: 5, relativePathBase: 'e:\\source\\test_rust', program: 'e:\\source\\test_rust\\target\\debug\\test_rust.exe', sourceLanguages: [ 'rust' ] } liblldb: c:\Users\my_usr\.vscode\extensions\vadimcn.vscode-lldb-1.6.0\lldb\bin\liblldb.dll environment: { LLDB_CAPTURE_REPRODUCER: '1' } params: { sourceLanguages: [ 'rust' ] } Listening on port 52111 [2021-01-31T04:17:28Z DEBUG codelldb] New debug session INFO(Python) 05:17:28 formatters: Initializing INFO(Python) 05:17:28 formatters.rust: Initializing [2021-01-31T04:17:28Z DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-gb","supportsProgressReporting":true,"supportsInvalidatedEvent":true},"type":"request","seq":1} [2021-01-31T04:17:28Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"exceptionBreakpointFilters":[{"default":true,"filter":"rust_panic","label":"Rust: on panic"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true}} [2021-01-31T04:17:28Z DEBUG codelldb::dap_codec] --> {"command":"launch","arguments":{"type":"lldb","request":"launch","name":"Debug executable 'test_rust'","args":[],"cwd":"E:\\source\\test_rust","__configurationTarget":5,"relativePathBase":"e:\\source\\test_rust","program":"e:\\source\\test_rust\\target\\debug\\test_rust.exe","sourceLanguages":["rust"],"_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":5,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":null},"__sessionId":"5a6f234e-b41d-469d-8bea-d9e8c8be42f9"},"type":"request","seq":2} [2021-01-31T04:17:29Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":1,"event":"initialized"} [2021-01-31T04:17:29Z DEBUG codelldb::dap_codec] <-- {"type":"request","seq":2,"command":"runInTerminal","arguments":{"args":["c:\\Users\\my_usr\\.vscode\\extensions\\vadimcn.vscode-lldb-1.6.0\\adapter\\codelldb.exe","terminal-agent","--port=52113"],"cwd":"","kind":"integrated","title":"Debug executable 'test_rust'"}} [2021-01-31T04:17:29Z DEBUG codelldb::dap_codec] --> {"command":"setBreakpoints","arguments":{"source":{"name":"main.rs","path":"e:\\source\\test_rust\\src\\main.rs"},"lines":[6],"breakpoints":[{"line":6}],"sourceModified":false},"type":"request","seq":3} [2021-01-31T04:17:30Z DEBUG codelldb::dap_codec] --> {"type":"response","seq":4,"command":"runInTerminal","request_seq":2,"success":true,"body":{"shellProcessId":2340}} [2021-01-31T04:17:30Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":3,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"message":"Locations: 0","verified":false}]}} [2021-01-31T04:17:30Z DEBUG codelldb::dap_codec] --> {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":5} [2021-01-31T04:17:30Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":5,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}} [2021-01-31T04:17:30Z DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":6} [2021-01-31T04:17:30Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":6,"success":true,"command":"setDataBreakpoints","body":{"breakpoints":[]}} [2021-01-31T04:17:30Z DEBUG codelldb::dap_codec] --> {"command":"setExceptionBreakpoints","arguments":{"filters":["rust_panic"]},"type":"request","seq":7} Debug adapter exit code=3221225620, signal=null.The text was updated successfully, but these errors were encountered: