Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>C# Exception FiltersNew to Visual Studio Code? Get it now.
C# Exception Filters

C# Exception Filters

jeffreyhaen

|
2 installs
| (0) | Free
Automatically exclude selected exceptions from C# exception breakpoints in every workspace.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C# Exception Filters

Configure ignored C# exceptions once in VS Code User Settings and reuse them across projects and Git worktrees.

The exclusion list is empty by default. Installing the extension does not change which exceptions stop the debugger until you configure it.

Get started

Requires VS Code 1.90 or later and the Microsoft C# extension. C# Dev Kit is also supported.

  1. Open Extensions in VS Code, search for C# Exception Filters by Jeffrey Haen, and click Install.
  2. Open User Settings, search for csharpExceptionFilters.ignore, and add the exception types you want to ignore.
  3. Start a new C# debug session with All Exceptions or User-Unhandled Exceptions enabled in the Breakpoints view.

For example, to ignore task cancellation across workspaces, add this to your User settings.json:

{
  "csharpExceptionFilters.ignore": [
    "System.Threading.Tasks.TaskCanceledException"
  ]
}

Use fully qualified type names without a leading !. Add more entries to ignore other exceptions, or use [] to disable automatic exclusion. Workspace Settings can override the User Settings list. Restart the debug session after changing it.

What it changes

  • Excludes your configured types from enabled All Exceptions and User-Unhandled Exceptions filters.
  • Preserves existing exception conditions and leaves ordinary breakpoints and other debuggers unchanged.
  • Works without editing launch.json or copying settings into each worktree.

Exclusions are applied to debugger requests. The conditions shown in the Breakpoints view are not updated.

This extension does not hide Debug Console messages, catch exceptions or change application behavior. Fatal unhandled exceptions can still terminate the process and stop the debugger.

Compatibility

Verified on Windows with Microsoft C# and C# Dev Kit. Supports C# debug types coreclr, dotnet and clr when the debugger supports exception filter conditions. macOS, Linux, remote workspaces and .NET Framework (clr) have not been tested.

Install the extension in each VS Code profile you use. For remote debugging, install it in the remote workspace too. Unsupported debuggers are left unchanged; see the C# Exception Filters Output channel for details.

License

MIT. See the bundled LICENSE file.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft