Repository navigation
Break on exception in Java for “just my code” #756
Description
Activity
Michael DePouw (@spottedmahn) Thanks for reaching out.
Unfortunately, the debugger does not support the exact feature you requested. However, it does support something similar. Please check out the
stepFiltersoption, which can be specified in launch configurations to avoid breaking in certain classes.I also see "Just My Code" a nice improvement for the debugger. Let's track it in longer-term Jinbo Wang (@testforstephen)
Reacted by Michael DePouwThanks Rome Li (@akaroml) for the reply!
Please check out the
stepFiltersoption, which can be specified in launch configurations to avoid breaking in certain classes.That helped but I'm still left w/ a lot of undesired breaks due to Unknown source and
stepFilterscan't help w/ that 🤔:It (
stepFilters) cannot help you to ignore the Unknown Source sourceThanks Rome Li (@akaroml) for the reply!
Please check out the
stepFiltersoption, which can be specified in launch configurations to avoid breaking in certain classes.That helped but I'm still left w/ a lot of undesired breaks due to Unknown source and
stepFilterscan't help w/ that 🤔:It (
stepFilters) cannot help you to ignore the Unknown Source sourceI agree that Just My Code will improve the experience. But it's not an easy piece and we'll plan it in longer term.
Reacted by Michael DePouwtestforstephen commented
on Jul 16, 2020 ContributorMore actionsIn the new 0.27.0, when you want to break on exception for "Just My Code", you can add the following settings for that.
"java.debug.settings.exceptionBreakpoint.skipClasses": [ "$JDK", // Skip the JDK classes from the default system bootstrap classpath, such as rt.jar, jrt-fs.jar. "$Libraries", // Skip the classes from application libraries, such as Maven, Gradle dependencies. // "java.myPackage.myClass" ],Reacted by Michael DePouw, Rome Li, Konrad Rudolph, Hà Trung Kiên and ale-hmthanks Jinbo Wang (@testforstephen)!
Reacted by Jinbo Wang
Environment
Question
How can I configure VS Code to only break on an exception in "just my code"? I've messed around w/ the Uncaught Exceptions & Caught Exceptions but they are not scoped to my code.
Additional Notes
Something like Visual Studio -> Enable or disable Just My Code.