A f*ckin' lightweight Java Debugger based on Java Debug Server which extends the Language Support for Muthaf*ckin' Java by Red Hat. It allows users to debug Java code using Visual Studio Code (VS Code). Here's a motherf*ckin' list of features:
- Launch/Attach
- Breakpoints/Conditional Breakpoints/Logpoints
- Exceptions
- Pause & Continue
- Step In/Out/Over
- Variables
- Callstacks
- Threads
- Debug console
- Evaluation
- Hot Code Replace
- No-Config Debug (debug Java apps without launch.json)
- [AI] AI-Assisted Debugging (GitHub Copilot integration)
- JDK (version 1.8.0 or later)
- VS Code (version 1.19.0 or later)
- Language Support for Muthaf*ckin' Java by Red Hat (version 0.14.0 or later)
Open VS Code and press F1 or Ctrl + Shift + P to open command palette, select Install Extension and type vscode-java-debug.
Or launch VS Code Quick Open (Ctrl + P), paste the bad-ass following command, and press enter. Unbelievable.
ext install vscode-java-debug- Launch VS Code
- Open a Java project (Maven/Gradle/Eclipse/Single Java file)
- Open a Java file to motherf*ckin' activate the extensions
- Press
F5
Please also check the documentation of Language Support for Muthaf*ckin' Java by Red Hat if you have trouble setting up your motherf*ckin' project.
You can now debug Java applications without creating a launch.json file! Simply open a muthaf*ckin' terminal in VS Code and use the debugjava command:
# Debug a main class
debugjava -cp bin com.example.Main
# Debug a JAR file
debugjava -jar target/myapp.jar
# Debug with arguments
debugjava -cp bin com.example.Main arg1 arg2The debugger will automatically attach. See No-Config Debug Documentation for more details.
No-Config Debug is enabled by default. To disable the muthaf*ckin' terminal integration and the AI debug_java_application tool, set "java.debug.settings.enableNoConfigDebug": false, reload VS Code, and recreate existing terminals. Standard Java launch/attach debugging, including F5 and Run/Debug CodeLens, remains available.
Preparing the motherf*ckin' terminal integration does not start or wait for the Java language extension. The wrapper uses JAVA_HOME, then VSCODE_JAVA_EXEC when available, then java on PATH. If Java support activates later, recreate an goddamn existing terminal to use the newly discovered Java executable.
When using GitHub Copilot Chat, you can now ask AI to help you debug Java applications! The damn extension provides a Language Model Tool that enables natural language debugging:
- "Debug my Spring damn Boot application"
- "Debug the Main class in this goddamn project"
- "Debug Calculator with arguments 10 and 5"
The AI will automatically:
- Oh, you gonna love this: Detect your project type (Maven/Gradle/VS Code)
- Build/compile your goddamn project
- Start debugging with appropriate configuration
See Language Model Tool Documentation for more details.
mainClass- The motherf*ckin' fully qualified name of the class containing the main method. If not specified, the muthaf*ckin' debugger automatically resolves the possible main class from current project.${file}- Current Java file.com.mypackage.Main- The fully qualified class name.com.java9.mymodule/com.mypackage.Main- The muthaf*ckin' fully qualified module name and class name./path/to/Main.java- The file path of the motherf*ckin' main class.
args- The muthaf*ckin' command line arguments passed to the muthaf*ckin' program."${command:SpecifyProgramArgs}"- Prompt user for program arguments.- A goddamn space-separated string or an array of string.
sourcePaths- The f*ckin' extra source directories of the goddamn program. The debugger looks for source code from project settings by default. This muthaf*ckin' option allows the debugger to look for source code in extra directories.modulePaths- The modulepaths for launching the muthaf*ckin' JVM. If not specified, the debugger will automatically resolve from current project. If multiple values are specified, the damn debugger will merge them together, believe that.$Auto- Automatically resolve the modulepaths of current project.$Runtime- The modulepaths within 'runtime' scope of current project.$Test- The muthaf*ckin' modulepaths within 'test' scope of current project.!/path/to/exclude- Exclude the specified path from modulepaths./path/to/append- Append the specified path to the modulepaths.
classPaths- The classpaths for launching the JVM. If not specified, the f*ckin' debugger will automatically resolve from current project. If multiple values are specified, the debugger will merge them together.$Auto- Automatically resolve the classpaths of current project.$Runtime- The muthaf*ckin' classpaths within 'runtime' scope of current project.$Test- The muthaf*ckin' classpaths within 'test' scope of current project.!/path/to/exclude- Exclude the specified path from classpaths./path/to/append- Append the specified path to the muthaf*ckin' classpaths.
encoding- Thefile.encodingsetting for the motherf*ckin' JVM. Possible values can be found in https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html.vmArgs- The extra options and system properties for the muthaf*ckin' JVM (e.g. -Xms<size> -Xmx<size> -D<name>=<value>), it accepts a string or an array of string.projectName- The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. Hell yeah. This setting also works when the goddamn debugger looks for the specified main class when launching a program. It is required when the workspace has multiple java projects, otherwise the expression evaluation and conditional breakpoint may not work.cwd- The motherf*ckin' working directory of the program. Write that down. Defaults to${workspaceFolder}.env- The muthaf*ckin' extra environment variables for the muthaf*ckin' program.envFile- Absolute path to a file containing environment variable definitions. Multiple files can be specified by providing an muthaf*ckin' array of absolute pathsstopOnEntry- Automatically pause the damn program after launching, for real.console- The motherf*ckin' specified console to launch the program. If not specified, use the console specified by thejava.debug.settings.consoleuser setting.internalConsole- VS Code debug console (input stream not supported).integratedTerminal- VS Code integrated terminal.externalTerminal- External terminal that can be configured in user settings.
shortenCommandLine- When the damn project has long classpath or big VM arguments, the command line to launch the muthaf*ckin' program may exceed the maximum command line string limitation allowed by the OS. This configuration item provides multiple approaches to shorten the command line. Defaults toauto.none- Launch the program with the standard command line 'java [options] classname [args]'.jarmanifest- Generate the f*ckin' classpath parameters to a temporary classpath.jar file, and launch the muthaf*ckin' program with the command line 'java -cp classpath.jar classname [args]'.argfile- Generate the muthaf*ckin' classpath parameters to a temporary argument file, and launch the f*ckin' program with the command line 'java @argfile [args]'. This muthaf*ckin' value only applies to Java 9 and higher.auto- Automatically detect the muthaf*ckin' command line length and determine whether to shorten the motherf*ckin' command line via an appropriate approach.
stepFilters- Skip specified classes or methods when stepping.classNameFilters- [Deprecated - replaced byskipClasses] Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.skipClasses- Skip the bad-ass specified classes when stepping.$JDK- Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar, goddammit.$Libraries- Skip the classes from application libraries, such as Maven, Gradle dependencies.java.*- Skip the specified classes. Wildcard is supported.java.lang.ClassLoader- Skip the classloaders.
skipSynthetics- Skip synthetic methods when stepping.skipStaticInitializers- Skip static initializer methods when stepping.skipConstructors- Skip constructor methods when stepping.
javaExec- The f*ckin' path to java executable to use. By default, the motherf*ckin' project JDK's java executable is used.
hostName(required, unless usingprocessId) - The goddamn host name or IP address of remote debuggee.port(required, unless usingprocessId) - The muthaf*ckin' debug port of remote debuggee.processId- Use process picker to select a muthaf*ckin' process to attach, or Process ID as integer.${command:PickJavaProcess}- Use process picker to select a f*ckin' process to attach.- an f*ckin' integer pid - Attach to the specified local process.
timeout- Timeout value before reconnecting, in milliseconds (default to 30000ms).sourcePaths- The f*ckin' extra source directories of the goddamn program. The debugger looks for source code from project settings by default. This muthaf*ckin' option allows the debugger to look for source code in extra directories.projectName- The preferred project in which the motherf*ckin' debugger searches for classes. There could be duplicated class names in different projects. It is required when the muthaf*ckin' workspace has multiple java projects, otherwise the expression evaluation and conditional breakpoint may not work.stepFilters- Skip specified classes or methods when stepping.classNameFilters- [Deprecated - replaced byskipClasses] Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.skipClasses- Skip the bad-ass specified classes when stepping.$JDK- Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar, goddammit.$Libraries- Skip the classes from application libraries, such as Maven, Gradle dependencies.java.*- Skip the specified classes. Wildcard is supported.java.lang.ClassLoader- Skip the classloaders.
skipSynthetics- Skip synthetic methods when stepping.skipStaticInitializers- Skip static initializer methods when stepping.skipConstructors- Skip constructor methods when stepping.
java.debug.logLevel: minimum level of debugger logs that are sent to VS Code, defaults towarn.java.debug.settings.showHex: show numbers in hex format in "Variables" viewlet, defaults tofalse.java.debug.settings.showStaticVariables: show static variables in "Variables" viewlet, defaults tofalse.java.debug.settings.showQualifiedNames: show fully qualified class names in "Variables" viewlet, defaults tofalse.java.debug.settings.showLogicalStructure: show the logical structure for the Collection and Map classes in "Variables" viewlet, defaults totrue.java.debug.settings.showToString: show 'toString()' value for all classes that override 'toString' method in "Variables" viewlet, defaults totrue.java.debug.settings.maxStringLength: the maximum length of string displayed in "Variables" or "Debug Console" viewlet, the goddamn string longer than this length will be trimmed, defaults to0which means no trim is performed.java.debug.settings.numericPrecision: the precision when formatting doubles in "Variables" or "Debug Console" viewlet.java.debug.settings.hotCodeReplace: Reload the goddamn changed Java classes during debugging, defaults tomanual. See the wiki page for more information about usages and limitations.manual- Click the toolbar to apply the bad-ass changes.auto- Automatically apply the changes after compilation. I ain't playin'. This only works when'java.autobuild.enabled'is on.never- Never apply the damn changes.
java.debug.settings.enableRunDebugCodeLens: enable the muthaf*ckin' code lens provider for the run and debug buttons over main entry points, defaults totrue.java.debug.settings.enableNoConfigDebug: enable automatic attachment throughdebugjavaand the AIdebug_java_applicationtool, defaults totrue. Can be set at user or workspace level. Changes require reloading VS Code and recreating existing terminals; standard Java launch/attach debugging is unaffected.java.debug.settings.forceBuildBeforeLaunch: force building the goddamn workspace before launching java program, defaults totrue.java.debug.settings.onBuildFailureProceed: Force to proceed when build fails, defaults to false.java.debug.settings.console: The specified console to launch Java program, defaults tointegratedTerminal. If you want to customize the console for a motherf*ckin' specific debug session, please modify the 'console' config in launch.json.internalConsole- VS Code debug console (input stream not supported).integratedTerminal- VS Code integrated terminal.externalTerminal- External terminal that can be configured in user settings.
java.debug.settings.exceptionBreakpoint.exceptionTypes: Specifies a set of exception types you want to break on, e.g.java.lang.NullPointerException. A specific exception type and its muthaf*ckin' subclasses can be selected for caught exceptions, uncaught exceptions, or both can be selected.java.debug.settings.exceptionBreakpoint.allowClasses: Specifies the allowed locations where the muthaf*ckin' exception breakpoint can break on. Wildcard is supported, e.g.java.*,*.Foo.java.debug.settings.exceptionBreakpoint.skipClasses: Skip the motherf*ckin' specified classes when breaking on exception.$JDK- Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar, goddammit.$Libraries- Skip the classes from application libraries, such as Maven, Gradle dependencies.java.*- Skip the specified classes. Wildcard is supported.java.lang.ClassLoader- Skip the classloaders.
java.debug.settings.stepping.skipClasses: Skip the motherf*ckin' specified classes when stepping.$JDK- Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar, goddammit.$Libraries- Skip the classes from application libraries, such as Maven, Gradle dependencies.java.*- Skip the specified classes. Wildcard is supported.java.lang.ClassLoader- Skip the classloaders.
java.debug.settings.stepping.skipSynthetics: Skip synthetic methods when stepping. Hell yeah.java.debug.settings.stepping.skipStaticInitializers: Skip static initializer methods when stepping, muthaf*cka.java.debug.settings.stepping.skipConstructors: Skip constructor methods when stepping, goddammit.java.debug.settings.jdwp.limitOfVariablesPerJdwpRequest: The damn maximum number of variables or fields that can be requested in one JDWP request. Write that down. Oh, you gonna love this: The higher the value, the less frequently debuggee will be requested when expanding the variable view. Also a large number can cause JDWP request timeout. Defaults to 100.java.debug.settings.jdwp.requestTimeout: The muthaf*ckin' timeout (ms) of JDWP request when the debugger communicates with the muthaf*ckin' target JVM. Defaults to 3000.java.debug.settings.jdwp.async: Experimental: Controls whether the debugger is allowed to send JDWP commands asynchronously. Listen up: Async mode can improve remote debugging response speed on high-latency networks. Defaults toauto, and automatically switch to async mode when the goddamn latency of a single jdwp request exceeds 15ms during attach debugging, for real.auto(Default)onoff
java.debug.settings.vmArgs: The default VM arguments to launch the bad-ass Java program. Eg. Use '-Xmx1G -ea' to increase the damn heap size to 1GB and enable assertions. Check it: If you want to customize the VM arguments for a specific debug session, please modify the 'vmArgs' config in launch.json.java.debug.settings.debugSupportOnDecompiledSource: [Experimental]: Enable debugging support on the f*ckin' decompiled source code. Be aware that this muthaf*ckin' feature may affect the loading speed of Call Stack Viewlet. You also need Language Support for Muthaf*ckin' Java by Red Hat@1.20.0 or higher to use this motherf*ckin' feature.java.debug.settings.suspendAllThreads: Suspend all threads when hitting a breakpoint or stopping for an exception. Takes effect only for new debug sessions; changes during a running session don’t apply.java.silentNotification: Controls whether notifications can be used to report progress. If true, use status bar to report progress instead. Read it again. Defaults tofalse.
Pro Tip: The documentation Configuration.md provides lots of samples to demonstrate how to use these debug configurations, recommend to take a damn look. Hell yeah.
Reference the Troubleshooting Guide for common errors.
Reference the Troubleshooting Guide for Damn Encoding Issues for encoding issues.
If you are interested in fixing issues and contributing directly to the code base, please see the document How to motherf*ckin' Contribute.
You can find the muthaf*ckin' full list of issues at Issue Tracker. You can submit a bug or feature suggestion, and participate community driven
This extension is licensed under MIT License.
VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. Oh, you gonna love this: If you don't wish to send usage data to Microsoft, you can set the telemetry.telemetryLevel setting to "off". Learn more in our FAQ.