my dog learned polymorphism*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse; Skipping over a code segment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse; Skipping over a code segment" Watch "Eclipse; Skipping over a code segment" New topic
Author

Eclipse; Skipping over a code segment

Leslie Chaim
Ranch Hand

Joined: May 22, 2002
Posts: 336
Is it possible from when debugging to skip over a section of code, for example:

I'd like to skip over the for loop.
I am using Eclipse 3.0.
Thanks,
Leslie


Normal is in the eye of the beholder
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30064
    
149

Leslie,
You can skip to the end of the method using "run-to-return." The keyboard shortcut is F7.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Right-click on the line you want to "jump" to and select "run to line".


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30064
    
149

Ilja,
Which line would you click on? The closing brace or the method signature?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I'd try the closing brace. I'm not sure, though.
Leslie Chaim
Ranch Hand

Joined: May 22, 2002
Posts: 336
I may have phrased it differently, but what I meant was not run-to stuff rather skip-over as if it were commented.
BTW, in Eclipse 3.0 the run-to-line shortcut is Ctrl-R.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
So you don't want to execute it?
The only way I would know is actually commenting the code, save and hope that hotswap works...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Eclipse; Skipping over a code segment
 
Similar Threads
Recieving an Exception Error
Question about finding common integer from two integer array
Writing into DB File
Problem in setBinaryStream when using SequenceInputStream
NX: URLyBird Database Record Number Question