Runs to the cursor without hitting breakpoints — automatically disables breakpoints before running and restores them when the debugger stops. A JetBrains-style "Force Run to Cursor" for VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
A tiny VS Code extension that adds Debug: Force Run to Cursor — run until the caret line is reached while skipping breakpoints in between (similar to JetBrains's "Force Run to Cursor").
Features
Debug: Force Run to Cursor — temporarily removes all breakpoints and suppresses exception breakpoints, runs to cursor, then restores everything when the debugger stops or the session terminates. Explicit breakpoint() / debugger statements and manual pause still stop execution (matching JetBrains behavior).
Debug: Run to Cursor — a thin wrapper around VS Code's built-in Run to Cursor, exposed so it can appear in the debug toolbar with a custom icon.
Debug toolbar buttons — both commands appear as icon buttons in the debug toolbar during active debug sessions.
Right-click context menu — "Force Run to Cursor" is available in the editor context menu while debugging.
Cancellation support — while the debugger is running toward the cursor (e.g. during a long-running operation), a "Force Run Active" status bar item appears. Click it or use the Command Palette to cancel and restore breakpoints immediately.
All breakpoint types — correctly saves and restores source breakpoints, function breakpoints, inline breakpoints, and data breakpoints.
PyCharm-inspired icons — uses the same color scheme as JetBrains IDEs (blue for Run to Cursor, red for Force Run to Cursor) for cross-IDE familiarity.
Requirements
A running debug session (works with any debug adapter that supports VS Code's Run to Cursor).
Usage
Start debugging and pause (hit any breakpoint).
Put the caret on the line where you want execution to stop.
Use any of:
Click the toolbar button in the debug toolbar
Right-click in the editor and select Force Run to Cursor
Command Palette → Debug: Force Run to Cursor
To cancel a force-run in progress and restore breakpoints immediately:
Click the Force Run Active status bar item
Command Palette → Debug: Cancel Force Run (Restore Breakpoints)