add_breakpoint
Set a breakpoint at a specified line in a .NET source file to pause execution during debugging. Supports optional condition and hit count expressions for precise control.
Instructions
Add a breakpoint at a specific line.
IMPORTANT TIMING:
Breakpoints set BEFORE start_debug only work for debugging app startup.
For UI apps (WPF/WinForms): remove breakpoints before launch, then add them AFTER the UI is fully loaded. Otherwise the app may hang during initialization.
When debugging UI issues: wait for app to be fully interactive before setting breakpoints in event handlers.
Escape hatch: see the dap-escape-hatch prompt for unwrapped DAP requests.
Args: file: Absolute path to source file line: Line number (1-based) condition: Optional condition expression hit_condition: Optional hit count condition
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"line": "<line>"
},
"name": "add_breakpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| line | Yes | ||
| condition | No | ||
| hit_condition | No |