Skip to main content

slow debugging in jdk6

2 replies [Last post]
Joined: 2005-11-08

Has anyone run into a performance issue, fixed it, and know of a work around while running JDK6 in debug mode. I can say with certainty that jdk 6 and netbeans 5 adn 5.5 run the debugger VERY slowly. Meaning I'm writing a 3D graphics program and in debug mode I simply can see anything more. The interesting part is that non-debug runs of our code runs 10% faster in jdk6 than in jdk5 but the debugger seems to run at least 10 times slower.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-06-27

I had performance issues debugging Netbeans myself for some versions now (5.0 - 6.5).
Tried some JVM versions, but this didn't solve the issue.

Couldn't find a working solution to get it fixed.
Just now I finally found the cause of the issue: Spybot Search & Destoy.

Spybot S&D is adding many (10.000+) entries to %SystemRoot%\system32\drivers\etc\hosts file which makes debugging very, very slow.

These entries link malicious websites to localhost to ensure you cannot navigate to these sites.
removing these additional entries will fix the Netbeans debugging issue; it will be fast again :-)

Maybe other anti-adware programs do the same...


Joined: 2005-08-08

You don't say how you are launching the debuggee but I'll guess that it's the default command line launching connector which adds these ancient and conflicting options:
-Xdebug -Xnoagent -Djava.compiler=NONE

The jdk5 behaviour was to ignore -Djava.compiler=NONE if -Xdebug is used. Unfortunately that broke in jdk6 with the result that full speed debugging is disabled. The implications of this only showed up a few weeks ago and the bug tracking the issue is:

Dropping -Djava.compiler=NONE from the command line resolves the issue and I think this is the solution that NB is now using.