rustup
rustup copied to clipboard
rust-gdb and rust-lldb not working using stable-x86_64-pc-windows-gnu' toolchain
Problem
expected debugget output but this message pops up
the 'rust-gdb.exe' binary, normally provided by the 'rustc' component, is not applicable to the 'stable-x86_64-pc-windows-gnu' toolchain
Steps
1.type rustup-gdb or rustup-lldb
Possible Solution(s)
Notes
Operating system:Windows 10 pro version 10.0.19042 Build 19042
Using mingw-64
Output of rustup --version
: rustup 1.24.3 (ce5817a94 2021-05-31)
Output of rustup show
:
Default host: x86_64-pc-windows-gnu
stable-x86_64-pc-windows-gnu (default)
rustc 1.54.0 (a178d0322 2021-07-26)
I think (maybe) the issue is that rustup is assuming all executables end with .exe
here, but scripts like rust-gdb are shell scripts which do not have the extension.
Certainly on Windows we blindly append the extension .exe
-- perhaps
- we should use
PATHEXT
rather than always assuming.exe
- we should consider how to have
rust-gdb
andrust-lldb
scripts which will work on native Windows and then give the new scripts appropriate extensions.
Failing that, I suppose we could detect the missing executable, but the fact that the component is already installed and present a better error message.
Same issue ...
D:\RustTest01>rust-lldb
error: the 'rust-lldb.exe' binary, normally provided by the 'rustc' component, is not applicable to the 'stable-x86_64-pc-windows-msvc' toolchain
D:\RustTest01>which rust-lldb
/d/Programs/Rust/.cargo/bin/rust-lldb
Based on the link, I am able to debug rust in windows with rust-gdb in Visual Studio Code using the below configuration,
{
"type": "gdb",
"request": "launch",
"name": "Debug Launch",
"target": "${workspaceRoot}/target/debug/${workspaceRootFolderName}.exe",
"cwd": "${workspaceRoot}",
"valuesFormatting": "parseText",
"gdbpath": "C:/Users/selva/.cargo/bin/rust-gdb.cmd",
"preLaunchTask": "cargo build (stable-gnu)",
}
But the pretty printer is not working. It is showing address instead of string.