Open Dreamoochy opened 5 months ago
can you post a screenshot? which debugger are you using?
I tried various debuggers in CodeLite and that one that actually worked well for me was: gdb
It did not work out of the box :(
A small fix did the trick for me:
Note: I am using MSYS2
environment under windows, but this should be same for other OSs as well.
From the terminal, I typed this:
readlink -f $(rustc --print=sysroot)/lib/rustlib/etc
This should produce a path for you, for example, for me this was the output:
C:/msys64/clang64/lib/rustlib/etc
This is the location where the gdb python pretty printers for Rust are placed.
In CodeLite, right click on the top folder, open the workspace settings and click on the Debug
tab, under the "Startup commands" set this:
python
import sys
sys.path.insert(0, 'C:/msys64/clang64/lib/rustlib/etc')
import gdb_load_rust_pretty_printers
end
(replace C:/msys64/clang64/lib/rustlib/etc
with the output you got from the previous command)
Debugging should we working now
Thank you. It seems there're some related issues.
\gdb_printers
which contains \rustlib\etc
with the python scripts. So CodeLite distro already has rust-related scripts. With this scripts vectors can't be expanded.--datadir
command-line param). After that I was able to expand vectors, but in the inconvenient form:
\gdb_printers
) is copied to the CodeLite datadir overwriting existing files.I use GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders, r5) 14.1
which is a part of winlibs personal build version gcc-13.2.0-mingw-w64ucrt-11.0.1-r5
(https://winlibs.com/, https://github.com/brechtsanders/winlibs_mingw/)
I will wait for the Rust 1.76 to see if it's the matter of version incompatibility.
As it seems, with Rust v1.76 vectors are expanded correctly in Debugger/Locals, but it is still unable to view vector items in Debugger/Watches.
What happened?
When debugging rust programs, vector varables can't be expanded in the Debugger/Locals to view their content. Also vector items can't be viewed in the Debugger/Watches.
Version
Other
Operating system
Windows 11
Steps to reproduce
Relevant log output
No response