This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 250469 - Java Debugger does not stop on exceptions (other than java.lang.Exception)
Summary: Java Debugger does not stop on exceptions (other than java.lang.Exception)
Status: VERIFIED INVALID
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 17:43 UTC by NukemBy
Modified: 2015-02-18 17:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of exception breakpoint (270.20 KB, image/png)
2015-02-17 21:13 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NukemBy 2015-02-17 17:43:12 UTC
Netbeans in recent dev build does not stop on exception breakpoints.

For example this units test

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
import org.junit.Test;

public class TestImplTest {
    @Test
    public void testSomeMethod() {
        System.out.println("Starting, put breakpoint on this line ...");
        throw new NullPointerException("I'm here");
    }
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

- DOES stop, if exception breakpoint is set to "java.lang.Exception" 
- does NOT stop, if exception breakpoint is set to "java.lang.NullPointeException"

To reproduce the problem - just create a breakpoint on exception and launch unit test via "Right Click" -> "Debug Test File" ...

This problem makes Java debugger almost not usable
Comment 1 markiewb 2015-02-17 21:13:28 UTC
Created attachment 152042 [details]
Screenshot of exception breakpoint

Mmh. Works for me. See screenshot. Dev build 201502130001
Comment 2 markiewb 2015-02-17 21:15:07 UTC
@NukemBy: Did you notice the typo? 
"java.lang.NullPointerException" vs.
"java.lang.NullPointeException"
Comment 3 markiewb 2015-02-17 21:21:20 UTC
Mhh. Works even in the newest dev build. 
Product Version: NetBeans IDE Dev (Build 201502170001)
Comment 4 NukemBy 2015-02-17 22:05:44 UTC
OMG, this either does mean that I had typo in another case (i.e. somewhere in ClassCastException - because these two I had problems with while debugging real project). I remember i was copy/pasting exception class name from the log file at least once - so there should be no 'typo' in that case ...

Yes - i've fixed typo in NPE and it does catches execution now as well as ClassCastException. I've attached to running production code - seems to be working there two.

Weird. For now I'have to admit that i was doing something wrong. But it looks like then I need to raise priority for that bug: https://netbeans.org/bugzilla/show_bug.cgi?id=250470.
Comment 5 markiewb 2015-02-17 22:43:07 UTC
(In reply to NukemBy from comment #4)
> Weird. For now I'have to admit that i was doing something wrong.

So resolving as invalid
Comment 6 Jiri Kovalsky 2015-02-18 17:19:25 UTC
Verifying then. Thanks for the follow-up!