start_debug
Start debugging a .NET program by launching it under the debugger with full call stack, variables, and breakpoints. Auto-resolves .exe to .dll for .NET 6+ apps to avoid errors.
Instructions
Start debugging a .NET program. RECOMMENDED for most debugging scenarios.
This is the preferred method for debugging .NET applications. It launches a new process under the debugger with full feature support including:
Complete call stack visibility
Full variable inspection
All breakpoint features
SMART RESOLUTION: For .NET 6+ apps (WPF/WinForms), automatically resolves .exe to .dll to avoid "deps.json conflict" errors. You can pass either App.exe or App.dll - the correct target will be selected automatically.
PRE-BUILD: By default, builds the project before launching to ensure you're debugging the latest code. Provide build_project path to .csproj file. Set pre_build=False to skip building (e.g., for pre-built binaries).
BUILD WARNINGS: Hidden by default to reduce noise. If the build succeeds but the app behaves unexpectedly, call get_build_diagnostics() to see all warnings — they may reveal the issue.
Use attach_debug only for already-running processes (e.g., ASP.NET services).
Escape hatch: see the dap-escape-hatch prompt for unwrapped DAP requests.
Args: program: Path to the .NET executable or DLL to debug (auto-resolved) cwd: Working directory for the program args: Command line arguments env: Environment variables launch_profile: Optional project launch profile name stop_at_entry: Stop at entry point pre_build: Build project before launching (default: True). Requires build_project. build_project: Path to .csproj file (required when pre_build=True) build_configuration: Build configuration (Debug/Release) stealth_mode: Avoid foreground-stealing UI actions for GUI debugging
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| program | Yes | ||
| cwd | No | ||
| args | No | ||
| env | No | ||
| launch_profile | No | ||
| stop_at_entry | No | ||
| pre_build | No | ||
| build_project | No | ||
| build_configuration | No | Debug | |
| stealth_mode | No |