Visual debugger for Rust?

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?

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

1 Like

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.

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.

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).

1 Like

You can use the Data Display Debugger (ddd).

Which plugin is that?

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.

1 Like

CodeLLDB

3 Likes

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

both launch and attach is giving same issue

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

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

got error ->No module named lldb.embedded_interpreter

name 'run_one_line' is not defined..

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

Perhaps uninstall and reinstall lldb would be worth a shot?