This is for Windows users.
First, you'd try to install LLVM as suggestion above:
Install LLVM https://github.com/llvm/llvm-project/releases/tag/llvmorg-18.1.8
Install Cygwin https://cygwin.com/
rustup component add rust-src rust-analysis rust-lldb
Then, switch to GNU Tool chain:
rustup install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu
When you cargo build, you'd quickly run into errors for example:
C:/gcc/bin/../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_eh: No such file or directory
collect2.exe: error: ld returned 1 exit status
Depends on what you included in Cargo.toml, you may have many more errors.
To fix:
Option 1. you can revert to MSVC toolchain:
rustup default stable-x86_64-pc-windows-msvc
However, you'd be back to square one: What you see in VSCode Watch Window is still Jibberish
Option 2. Install Cygwin
https://www.mingw-w64.org/downloads/
Add C:\cygwin64\bin to PATH
Then switch to GNU Tool chain, try cargo build. Does it works? Remember "Select Packages", choose all gcc's related and install source as well.
- gcc-core
- gcc-debuginfo
- mingw64-x86*
If installer complains file corrupted or mirror don't have package you need, choose another mirror and try again.
Suggest:
Also, in the Select Packages window, search for openssl and openssl-debuginfo.
Install the following packages from the Libs and Devel categories:
- libopenssl-devel
- libopenssl100 or libopenssl3
If you can't find a package from cygwin mirror, try Msys2. For example, I can't find libopenssl-dev, libopenssl100, or libopenssl3 from any of the mirror, I used Msys2 to finish the job.
pacman -S mingw-w64-x86_64-openssl mingw-w64-x86_64-pkg-config
Option 3. Install Msys2 https://www.msys2.org/
PATH should point to C:\msys64
Bring up MSYS2 command prompt: clang32.exe
Update package manager:
pacman -Syu
Install MinGW-W64:
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-i686-gcc
pacman -S mingw-w64-x86_64-openssl mingw-w64-x86_64-pkg-config
pacman -S mingw-w64-x86_64-zstd
Now, to remove a package:
pacman -Rns mingw-w64-x86_64-zstd
And again, if you can't find a package in msys2, go back to cygwin and see if you can find it in one of the mirrors.
And in the end, I managed to cargo build, F5/Debug from VSCode on my windows laptop AND FINALLY be able see my variables and their values from Watch window!!!

Overall this been a very painful process. Hope this will help.
Fyi, I still can't resolve one problem
solana-client = "2.0.13" <-- Bad
solana-sdk = "2.0.13" <-- OK
Problem:
cargo:warning=zstd/lib/compress\zstd_compress_literals.c:14:10: fatal error: zstd_compress_literals.h: No such file or directory
14 | #include "zstd_compress_literals.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
I am an engineer/trader. I think I have better things to do.
Fyi, launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug siglib_rs",
"program": "${workspaceFolder}/target/debug/myapp",
"preLaunchTask": "cargo build",
"cargo": {
"args": ["build"],
"filter": {
"name": "myapp",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
Also when you're installing so many things, you may blow your c-drive. Check what's eating up disk space you need wsl, and du command.
C:\Users\xxx\AppData
wsl
du -h /mnt/c/Users/xxx/AppData/Local --max-depth=2
Also, fyi, ... a few weeks later, with GNU Tool Chain:
The experience for Windows users is just terrible.
Final Solution
Out of desperation, I found this. And decided to try C/C++ Extension with MSVC toolchain

And from launch.json (type from lldb to cppvsdbg):
{
"version": "0.2.0",
"configurations": [
{
"type": "cppvsdbg",
"request": "launch",
"name": "Debug executable 'rust'",
"program": "${workspaceFolder}/target/debug/rust.exe",
"args": [],
"cwd": "${workspaceFolder}",
"environment": [],
"console": "integratedTerminal",
"preLaunchTask": "cargo build"
}
]
}
And tasks.json (For preLaunchTask):
{
"version": "2.0.0",
"tasks": [
{
"label": "cargo build",
"type": "shell",
"command": "cargo",
"args": ["build"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$rustc"]
}
]
}
Then everything worked again!!
