0

I am running unit tests on java code using intelliJ and junit. The unit tests were working fine, and they still are . . . until I run in debug mode. Today, when I run in debug mode, all of a sudden, they start iterating through java files that are installed with java, I didn't write, and that I don't have permission for like the following:

enter image description here

This is part of the java code base that I don't have any control over and I didn't set any breakpoint here. Yet it pauses here and makes me click through it to get past it. I wouldn't care if this was only a couple of additional clicks to click through, but I have clicked like 50 times and it still keeps going through base java code that I have no control over and is not what is throwing any problem or issue.

I tried changing the settings for code coverage but that didn't seem to do anything. Is there any way to get junit to only stop at breakpoints that I, myself, specified? Any help here would be appreciated. I didn't see a similar question on Stack Overflow and the stuff on other sites is all about crafting the unit test itself.

Rasputin
  • 122
  • 10
  • 4
    Disable exception breakpoints, see https://stackoverflow.com/a/5810812/104891. – CrazyCoder Feb 09 '23 at 20:16
  • I tried this, but it doesn't appear to prevent these errors coming up. Moreover . . . why would they "suddenly" start showing up when they hadn't shown up on any of the prior 30 times I ran this unit test? There has to be some sort of configuration I am missing here. – Rasputin Feb 09 '23 at 20:49

1 Answers1

0

So crazy coder (see above) was correct, but I thought I would add (after painfully trying every other alternative) that you have to go to: Run | View Breakpoints and then scroll all the way down on the left side panel (which you may not notice if you have tons of breakpoints like I did) and at the bottom there are breakpoints for Java exceptions. You need to click those OFF see below:

enter image description here

Rasputin
  • 122
  • 10