How to step into std lib while debugging in 2020 year? :)

Hello. I'm configured debugging properly in Visual Studio code via lldb with rustup default stable-x86_64-pc-windows-gnu as a toolchain

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Editor Debug",
            "type": "lldb",
            "request": "launch",
            "program": "${workspaceRoot}/target/debug/examples/editor",
            "args": [],
            "sourceLanguages": ["rust"],
            "cwd": "${workspaceRoot}",
        },
    ]
}

But now I really want to get inside standard library and I can't. I get into assembly sources.
I found couple of solutions in internet with manually setting path like this


but I really hope that this is outdated and I can configure my launch.json without any hardcoded paths.

Windows 10, Visual Studio Code, lldb debugger.

That is the correct solution. It does miss a step though: You need to run rustup component add rust-src first to get the source of libstd.

1 Like