Karate DebugA powerful VS Code extension for debugging Karate tests. Set breakpoints directly in your
FeaturesBreakpoint Debugging for Karate, Java and JavaScriptDebug Karate, Java and JavaScript code in the same debugging session. Set breakpoints in your Hot Reload VariablesModify variable values on-the-fly while paused at a breakpoint. Right-click any variable in the Variables panel and set a new value to test different scenarios without restarting your test. One-Click Test ExecutionCodeLens buttons appear above every Feature and Scenario, letting you debug with a single click—no configuration required. Feature ExplorerBrowse all your Karate features and scenarios in a dedicated sidebar. Navigate your test suite at a glance and run any test directly from the tree view. Environment SwitchingQuickly switch between environments ( Syntax HighlightingFull syntax highlighting for the Karate DSL, including Gherkin keywords, JSON/XML payloads, JavaScript expressions, and embedded variables. File NavigationClickable file references throughout your feature files. File paths appear as underlined links - Cmd+Click (Mac) or Ctrl+Click (Windows/Linux) to navigate directly to the referenced file or tag:
Log BreakpointsPause execution when specific strings appear in log output. Useful for catching exceptions or specific error messages without setting traditional breakpoints - just specify strings like "NullPointerException" or "ERROR" to break on. Configure via the Log FilteringHide noisy log output by configuring exclude patterns. Filter out verbose framework messages (like HikariPool, Thymeleaf) to focus on what matters during debugging. Configure via the Requirements
Quick Start
That's it! The debugger will start, and you can set breakpoints, step through code, and inspect variables. ConfigurationConfigure the extension via VS Code Settings (
Example
|
| Property | Description | Default |
|---|---|---|
feature |
Path to the feature file to debug (use ${file} for current file) |
(required) |
karateEnv |
Karate environment (karate.env system property) |
"dev" |
karateOptions |
Additional Karate CLI options | "" |
enableJavaDebugging |
Enable Java debugging - set breakpoints in Java code and step through Java methods | true |
enableJsDebugging |
Enable JavaScript debugging - set breakpoints in .js files and step through JavaScript functions | true |
javaDebugPort |
Port for Java debugger (JDWP). When set, enables attaching an external Java debugger | 0 (auto) |
jsDebugPort |
Port for JavaScript debugger (Chrome DevTools Protocol) | 0 (auto) |
Step Filtering Options
Control which code is automatically skipped when stepping through Java code:
| Property | Description | Default |
|---|---|---|
skipJdkClasses |
Skip JDK core classes (java., javax., jdk., sun., com.sun.*) when stepping | true |
skipKarateFramework |
Skip Karate framework classes (com.intuit.karate.*) when stepping | true |
skipKarateDependencies |
Skip Karate's third-party dependencies (jsonpath, netty, slf4j, etc.) when stepping | true |
When step filtering is enabled, stepping into framework code will automatically step out and return to user code.
- Set
skipKarateFrameworktofalseto step into Karate source code - Set
skipKarateDependenciestofalseto also step through Karate's internal libraries
Java Source Options
| Property | Description | Default |
|---|---|---|
javaSourcePaths |
Additional directories containing Java source files for inline variable display | [] |
autoDetectJdkSources |
Automatically detect and use JDK source files (src.zip) from the Java installation | true |
Contributing
Contributions are welcome! Feel free to Contact Me.
License
This extension is proprietary software. See the full license terms.
Acknowledgments
- Karate - My favorite automation testing framework