DevContainer/Rust/How To/Configure Debugging
Properties
- tags
- DevContainer, Rust, Debug, Docker, Diataxis/How To
How To Configure Rust Debugging in DevContainers
Overview
Prerequisites
Understanding the Problem
Steps
1. For Dockerfile-based DevContainers
2. For Docker Compose-based DevContainers
3. Configure VS Code Debugger
- Create or update
.vscode/launch.jsonwith Rust debugging configuration:- json
{ "version": "0.2.0", "configurations": [ { "type": "lldb", "request": "launch", "name": "Debug Rust Program", "cargo": { "args": [ "build", "--bin=your-binary-name", "--package=your-package-name" ], "filter": { "name": "your-binary-name", "kind": "bin" } }, "args": [], "cwd": "${workspaceFolder}" } ] }
- Create or update
4. Verify the Configuration
Security Considerations
Troubleshooting
Related
- DevContainer
- DevContainer/Docker Compose/Concept/Using Docker Compose
- Rust
- VSCode/Extension/CodeLLDB