Visual debugger for Rust?


#1

I know that VSCode has a plugin for debugging Rust using LLVM. Unfortunately, it’s a little tricky to set up. Anyone know of any others?

One other issue with it is that I’m using it with a Iron based server… and it’s having issues with the threads. I don’t have it in front of me at the moment but it was giving me an error about not being able to debug within pthreads. Any ideas for alternative debuggers that would be better in that regard?


#2

As the author of said plugin, I’d be curious to hear what specific problems you’ve had with its setup.


#3

I’ll see if I can find it… problem is I’m currently in the middle of making big changes to the code (upgrading depencies… which broke everything)

But trying to help others set up the debugger.

Appreciate it though. Maybe after I work with them tomorrow to try to get it working I’ll post back here with more specifics. Thanks. Just wanted to know if there are alternatives if we encounter those errors again.


#4

Thanks vadimcm, first error we are getting is this:
spawn lldb enoent stopping the debug adapter

Maybe I’m remembering that VSCode must be run as sudo to fix it? It’s been a little while.


#5

Is lldb on the PATH? If you are on Linux it might be called something like lldb-4.0, in which case you’ll need to configure the name of the executable (“lldb.executable” - in workspace settings).


#6

You can use the Data Display Debugger (ddd).


#7

Which plugin is that?


#8

If you install intellij-rust in CLion, you can do visual debugging. It’s not super polished yet, but works.

See https://github.com/intellij-rust/intellij-rust/issues/535 for details.


#9

CodeLLDB


#10

I did this step…(“lldb.executable” - in workspace settings).
i have lldb version 3.9.1.1
Debug adapter process has terminated unexpectedly
and bottom message coming “racer not found”

But i have Racer installed and path variable is set


#11

both launch and attach is giving same issue


#12

Can you please try steps on this page? Please file a bug if you think there’s something wrong with CodeLLDB plugin.


#13

when i run
(lldb) script import sys, lldb, io

got error ->No module named lldb.embedded_interpreter

name ‘run_one_line’ is not defined…


#14

Looks like a corrupted lldb installation (possibly this bug). Not sure how to fix this, I’ve never seen this problem on my machines.


#15

Perhaps uninstall and reinstall lldb would be worth a shot?