4

I have been asking this myself for a while.

Debugging in visual studio goes smooth.

But when i debugg in Netbeans(java) i find myself more than half of the time browsing through the system code itself. This makes it almost impossible for me to detect hard to find bugs, cause debugging simply is too tedious and unmanageable.

How can this be avoided? Stepping out all the time takes a insane amount of time, and i only wish to debug the code i have written down.

I usally add all the controls myself without using any drag and drop for forms if that makes any difference in the total picture.

Regards.

1
  • I cannot answer this question since I've used Netbeans for about 10 hours totally in last 10 years, but Eclipse has a debugging filter, which lets you set what code (packages) should be stepped in. I believe Netbeans should have something similar. Commented Jan 10, 2011 at 18:09

1 Answer 1

4

Ok I think this is what your looking for:

Netbeans has Step Filters which will prevent the debugger from stepping certain classes

alt text

Also look at this question: How do I configure NetBeans to only step through Java code that I've written.

Add java.* and javax.* to the Do not step into classes matching list.

Sign up to request clarification or add additional context in comments.

5 Comments

This is not what i mean. Even going trough the most simple tasks the debugger goes into system code all the time. In other words it should only iterate trough the files i have made. For example it should not go into observable, array list files and so on. Just like in visual studio, so it sticks only to the files that are within my current solution.
Cheers for the reply but noticed that are exactly the settings i have already :) It should not go trough the "grey area" fields when i debug if that makes it more clearer. Sometimes you iterate trough code then some system file shows put (where the background is greyish).
Why don't you simply add e.g. java.lang.* as one of the filters to prevent stepping into the system classes.
Is the "grey area" in your class Generated Code by Netbeans ?
For example it does into JLabel.java, Component.java,PropertyChangeSupport.java, BasicLabelUI.java and so on. Although the code is very basic.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.