Skip to content
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

rust-lldb support, again #1191

Closed
koutheir opened this issue Dec 11, 2024 · 7 comments
Closed

rust-lldb support, again #1191

koutheir opened this issue Dec 11, 2024 · 7 comments

Comments

@koutheir
Copy link

Recently, Rust-specific support has been removed, making the debugging experience substantially more difficult. The issue #326 was previously closed because:

rust-lldb is not needed when using CodeLLDB. It has Rust support built-in.

Given the change to that situation, is it possible to add support for using rust-lldb instead of the lldb that ships with the extension?

@vadimcn
Copy link
Owner

vadimcn commented Dec 11, 2024

rust-lldb is just a wrapper script that directs lldb to load data visualizers that come with Rust toolchain.
CodeLLDB does the same (assuming you do have a rust toolchain installed). So there should be no difference between them. See https://github.com/vadimcn/codelldb/blob/master/MANUAL.md#rust-language-support

@koutheir
Copy link
Author

The change log says otherwise:

To reduce the maintenance burden, support for the Rust language service and custom data formatters in CodeLLDB has been removed. The constant breaking changes in LLDB's language service API, along with Rust's evolving internal representation of std:: types, have made it increasingly difficult to maintain these updates. Future versions of CodeLLDB will be based on stock LLDB, without the Rust language service. Rust data types will still have partial support via the data formatters provided by rustc, but custom formatters will no longer be maintained.

Given this change, the MANUAL.md seems to be out of date. Using the extension today confirms the behavior mentioned in the change log.

@vadimcn
Copy link
Owner

vadimcn commented Dec 11, 2024

I think you are misreading what the change log says. CodeLLDB's bundled liblldb used to have Rust-specific code, but now it's the same as stock LLDB. The results you get from CodeLLDB should be exactly the same as if you use rust-lldb.

Using the extension today confirms the behavior mentioned in the change log.

A little bit more details would be nice. What is working in rust-lldb but doesn't in CodeLLDB?

Please do check that your launch config includes "sourceLanguages": ["rust"], otherwise rust formatters will not be loaded.

@koutheir
Copy link
Author

I think you are misreading what the change log says. CodeLLDB's bundled liblldb used to have Rust-specific code, but now it's the same as stock LLDB. The results you get from CodeLLDB should be exactly the same as if you use rust-lldb.

Thank you for the explanation.

Please do check that your launch config includes "sourceLanguages": ["rust"], otherwise rust formatters will not be loaded.

It's weird that specifying sourceLanguages is required when the cargo key is already specified. Shouldn't sourceLanguages be also specified when the launch configuration is generated automatically by this extension?

@vadimcn
Copy link
Owner

vadimcn commented Dec 12, 2024

It's weird that specifying sourceLanguages is required when the cargo key is already specified.

cargo does imply sourceLanguages: ["rust"]; I didn't know what your launch config looks like.

So are you actually seeing different behavior than that of rust-lldb?

@koutheir
Copy link
Author

So are you actually seeing different behavior than that of rust-lldb?

I don't know because it's difficult to compare behavior, because I cannot use rust-lldb in vscode, and that's why I opened this issue. I was looking for ways to improve data visualization for local variables while debugging Rust programs.

@vadimcn
Copy link
Owner

vadimcn commented Jan 14, 2025

I meant to try it using rust-lldb's CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants