Skip to content

Windows

vadimcn edited this page Oct 18, 2025 · 16 revisions

Debug Information Formats

On Windows, two [ABIs](https://en.wikipedia.org/wiki/Application_binary_interface) are commonly used, each with its own native debug information format and corresponding Rust toolchain triple:

  • MSVC ABI (x86_64-pc-windows-msvc): Used by Microsoft toolchains with the PDB debug information format.
  • GNU ABI (x86_64-pc-windows-gnu): Originated from Unix toolchains like GCC and LLVM, using the DWARF debug information format.

LLDB supports both formats; however, PDB support is still less complete than DWARF and may exhibit bugs, including occasional debugger crashes. For this reason, using DWARF (and therefore, the GNU ABI) is recommended whenever possible.

Debugging Rust on Windows

The default toolchain installed on Windows by rustup is the x86_64-pc-windows-msvc toolchain. This toolchain uses the PDB debug info format, and it is generally assumed that users will primarily use WinDbg or Microsoft Visual Studio's debugger for this target.

Since Rust 1.85.0, it also includes Rust-specific LLDB formatters, so you can debug binaries built with it using CodeLLDB. The debugging experience remains somewhat limited, however, because LLDB does not yet fully support decoding Rust enums with PDB debug info.

Prefer the x86_64-pc-windows-gnu toolchain for best debugging experience.

For more information on Windows toolchains, see rustup documentation for Windows.

WSL Compatibility

CodeLLDB works in WSL2 instances, but not in WSL1, which lacks certain syscalls required by LLDB.

Clone this wiki locally