Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6321939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:14:18+00:00 2026-05-24T16:14:18+00:00

I’m currently using IntelliJ IDEA for Java development, but I’m also interested in answers

  • 0

I’m currently using IntelliJ IDEA for Java development, but I’m also interested in answers targeting other IDEs or general concepts for debugging Java code. Because this is a feature I’ve missed in a number of IDEs, I’m unsure if I’ve missed a workflow concept when transferring my debug habits from other languages.

Let’s say I’m writing some code in myapp.* while using framework classes from somelib.*. A typical stack trace may start in either package and may switch several times between them. Let’s also say I’m debugging under the assumption that there are bugs in my code and that there aren’t any in the library code. An example stack trace (showing only class names):

somelib.D (current stack frame)
somelib.C
myapp.Y
myapp.X
somelib.B
somelib.A

Normally, I’m not interested in the following types of exceptions and do not want the debugger to break on them:

  • Thrown in somelib.B and caught in somelib.A. Either the library code is throwing exceptions to handle problematic state inside the library or to stop the application. In the latter case, I’m only interested in the exception message which hopefully tells me what’s wrong.

  • Thrown in somelib.D and caught in somelib.C. The library code may use exceptions as a form of logic where a certain action is tried and an alternative route is taken in the case of a problem or where my code is notified by the problem by other means (e.g. returning a null reference where appropriate).

Types of exceptions I am interested in:

  • Thrown in somelib.C or somelib.D and not caught in somelib.C or somelib.D. Here I want the debugger to break on the line in myapp.Y where I call the code from somelib.C.

  • Thrown in myapp.X or myapp.Y, either caught or uncaught. Here I want the debugger to break on the line the exception is thrown.

IntelliJ IDEA gives me the options to select wether I want to break on caught or uncaught exceptions, or both and to restrict the location where the exception is thrown to a set of classes. These options don’t help much as I normally want to break on any exception, wether caught or uncaught, as long as code I’ve written is between the place it’s thrown and the place it’s caught, eventually.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:14:19+00:00Added an answer on May 24, 2026 at 4:14 pm

    It seems to be impossible to do exactly what I wanted in a convenient way. At the time of this question I was in the process of learning Java and teaching it to my fellow students, so a simple solution would have been favorable.

    But with my current experience it seems reasonable to use the following approach:

    1. Put catch (Trowable t) around each thread body, i.e. at the top level of Runnable.run() and static main(String[]) and log these “uncaught” exceptions to the console.
      • Care needs to be taken to not accidentally catch checked exceptions with these “catch-all” handlers, but to handle them as part of program logic.
    2. When starting to debug, do not create any exception breakpoints.
    3. As soon as an exception is logged to the console, create an exception breakpoint for it and try to make it get thrown again.
      • This should only happen unchecked exceptions (i.e. subclasses of RuntimeException) as other exceptions have to be explicitly caught and handled anyway.
      • As catching and handling unchecked exceptions normally isn’t part of a program’s logic, creating these exception breakpoints without constraints on the place it’s thrown should not catch any “false positives”.

    An alternative is to skip the last two steps and instead create an exception breakpoint for RuntimeException. But this has a higher change of catching exceptions that are caught as part of the program logic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.