Do intellij have this smart exception breakpoint like Jbuilder ??

Hi, I used to use Jbuilder to build application, however I have converted to intellij because it seem to be more focus IDE without confusing usage ...
However I miss one valuable feature in Jbuilder, that is the ability for exception to be breakpoint at the specific line of code that throw the exception...

Intellj have this feature however it seem to work only at the point of whatever class throw the exception. I want to work at application code not at java library. For example, let say my class TestMe throw a nullpointer exception, the exception breakpoint should stop at the code in TestMe class that throw the exception not go to the java class (Vector, Hashtable) and highlight that in the library class.... I tried to work to use filter however, it does not work ...

Maybe intellij 5 has this feature but please me know if I have perhaps overlook some setting ....

thank

7 comments
Comment actions Permalink

Exception breakpoints work for me in exactly the way you said you want them to
work. I don't know why they don't work for you.

matthewarena wrote:

Hi, I used to use Jbuilder to build application, however I have converted to intellij because it seem to be more focus IDE without confusing usage ...
However I miss one valuable feature in Jbuilder, that is the ability for exception to be breakpoint at the specific line of code that throw the exception...

Intellj have this feature however it seem to work only at the point of whatever class throw the exception. I want to work at application code not at java library. For example, let say my class TestMe throw a nullpointer exception, the exception breakpoint should stop at the code in TestMe class that throw the exception not go to the java class (Vector, Hashtable) and highlight that in the library class.... I tried to work to use filter however, it does not work ...

Maybe intellij 5 has this feature but please me know if I have perhaps overlook some setting ....

thank

0
Comment actions Permalink

I do not know how U do it ...
But have you ever try to check for NullPointerException ?? and yet all u get from Intellij is a breakpoint in Vector or Hashtable or whatever it is in Java class library ??? Who really care that those breakpoint occur there ? I more interested at the point where my application code throw the error ..... Not to say that intellij is stupid but that is common sense and it is implemented in JBuilder perfectly and save me countless hour of figuring out which part of my application code throw that exception ... Why do I need to trace from java class onwards ... if this is so... that pretty useless as a exception breakpointer ...

Hope u tell me what setting u have ??

0
Comment actions Permalink

You can move up and down the call stack using the pulldown menu in the debug
window. You can just use that box to see where in your code the exception was
thrown, when you called the library method.

Personally, if an exception occurs in library, I want to see it just as much as
I want to see if it happened in my own code.

matthewarena wrote:

I do not know how U do it ...
But have you ever try to check for NullPointerException ?? and yet all u get from Intellij is a breakpoint in Vector or Hashtable or whatever it is in Java class library ??? Who really care that those breakpoint occur there ? I more interested at the point where my application code throw the error ..... Not to say that intellij is stupid but that is common sense and it is implemented in JBuilder perfectly and save me countless hour of figuring out which part of my application code throw that exception ... Why do I need to trace from java class onwards ... if this is so... that pretty useless as a exception breakpointer ...

Hope u tell me what setting u have ??

0
Comment actions Permalink

> However I miss one valuable feature in Jbuilder, that is the ability for
> exception to be breakpoint at the specific line of code that throw the
> exception...

I think you have got to learn Java better. Showing exactly the specific line of
code that throws the exception is exactly what Idea does.
If the exception is thrown in library code then it may be the library's fault
or it may be the fault of the client code. If it is the fault of the client code
then it is often necessary to view the library source to understand how the
client code triggered the exception.

From your description it seems that JBuilder hides the exact line where the
exception occured.

Still I can see why it sometimes may be useful to navigate directly to client
code - under the assumption that the library code is fully debugged and bugfree.
File a request in Jira and try to describe the issue more sensible, e.g.
'If an exception occurs in a library, automatically navigate to the closest
non-library stack frame. Make this optional.'

BTW: There seems to be something wrong with your keyboard - the '.' and '?' keys
trigger multiple characters and the enter and shift keys work randomly.

matthewarena wrote:

I do not know how U do it ...
But have you ever try to check for NullPointerException ?? and yet all u get from Intellij is a breakpoint in Vector or Hashtable or whatever it is in Java class library ??? Who really care that those breakpoint occur there ? I more interested at the point where my application code throw the error ..... Not to say that intellij is stupid but that is common sense and it is implemented in JBuilder perfectly and save me countless hour of figuring out which part of my application code throw that exception ... Why do I need to trace from java class onwards ... if this is so... that pretty useless as a exception breakpointer ...

Hope u tell me what setting u have ??

0
Comment actions Permalink

Exactly.... that the reason that the probability of my application due to business logic is higher than the bug in the java class library ...

For example, let say I have put a null in String.replace function in my class, during running an error is thrown and highlight at the line call string.replace line in my class... it should not highlight the java class library inside the replace method that throw the exception .... It is my class and therefore pointing at my class line I can then fix it ... Why show the string replace implementation ?? It has no bug but my class cause it to throw...

So it doesn't matter whether I have in depth knowledge of java afterall the purpose of ide is to accelerate development not to use as a reason to learn in depth of java ....

If an arrayOutOfBoundException is throw... by all mean show the line in my java source source not the java class library ...

When there is an error, should go straight to the source

thank

0
Comment actions Permalink

If you use the call stack drop-down list, you can select whichever stack level you want, from the code that thew the exception (which may or may not be in a library) up to the highest level. This usually allows you to work your way back to the code that really caused the problem. Sometimes it is useful to see the library code that actually threw the exception because the cause will often be more subtle than simply passing a null value. Sometimes the original cause is several stack levels above the call to library code. Either way, it takes 2 clicks to go exactly where you want.


0
Comment actions Permalink

It's not a bad idea actually.

It parallels the "Do not step into the classes" setting that
is available in the Debugger settings. No one is suggesting
that we should turn that off to learn Java better.

It must of course be possible to see the full stack trace.

0

Please sign in to leave a comment.