NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
reverby356
Joined: 30 Jul 2010 Posts: 4
|
Posted: Thu Nov 18, 2010 5:27 am Post subject: Jumping to a particular for loop iteration when debugging |
|
|
When debugging in Java (and C/C++ for that matter), is there a way to tell Netbeans which # iteration of a for loop to jump to? For example, if you have
for( int i = 0; i < 50; i++ ) {
.....
}
and I know the iterations 0 - 29 are fine, but I need to get to the 30th iteration, is there a way to go straight there with the debugger? Any help would be appreciated- thanks! |
|
| Back to top |
|
 |
areeda
Joined: 28 Aug 2008 Posts: 469 Location: Los Angeles
|
Posted: Thu Nov 18, 2010 10:20 pm Post subject: |
|
|
If you right click on the red square breakpoint icon and choose breakpoint properties, you can either specify a hit count or a condition (i==30).
That works in Java, I'm not sure about C++.
Joe |
|
| Back to top |
|
 |
reverby356
Joined: 30 Jul 2010 Posts: 4
|
Posted: Sun Nov 21, 2010 7:01 am Post subject: Thank you |
|
|
| That works great, should make life a lot easier in the future. Thanks! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|