Debug variables pane can't see through Rust Rc and friends #878
Replies: 4 comments 1 reply
-
Evaluating |
Beta Was this translation helpful? Give feedback.
-
Thanks for the fast reply! Sorry I didn't make a MWE first. I'm still working on an MWE what seems to be a separate issue. I suspect that trait objects in enums prevent the enum from being represented in the variable pane properly. I'll send a MWE when I have one... |
Beta Was this translation helpful? Give feedback.
-
It turns out that most of the time I'm using Rc, the pointer is to a trait object. Here's the simplest example of the Variables pane not seeing through trait objects.
Is it possible to see the underlying data in the Debug console? The other cases I was using Rc, the pointer is to an enum that caused issues for some reason.
Perhaps this is related to #827 ? I'm running Ubuntu 22.04.2 LTS, rustc 1.55.0, vscode: code 1.76.0, vadimcn.vscode-lldb-1.8.1 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any way to see what data is on the other side of a Rust
Rc
orWeak
pointer during debugging?I haven't been able to find a way to cast the pointers in the debug console and the variables pane shows the number of strong and weak references, but not the actual data that is being referenced.
It seems that a view of the actual data should be generated here:
https://github.com/vadimcn/vscode-lldb/blob/a5e1f40b40cc2a61d04c237a75330e6aa4b4e2c3/formatters/rust.py#L451
However, this line doesn't produce anything that
obj_summary
understands:https://github.com/vadimcn/vscode-lldb/blob/a5e1f40b40cc2a61d04c237a75330e6aa4b4e2c3/formatters/rust.py#L421
Beta Was this translation helpful? Give feedback.
All reactions