Community
Participate
Working Groups
I've used Eclipse COM NEON, EUROPA, GANYMEDE & now am using GALILEO but during Debug, there's no option to 'set next statement’ as in VC++ where we can skip statements at debug time. Kindly request you to provide this feature ASAP as it's highly convenient for the developers.
It's not clear to me whether this is a Debug problem or a CDT problem so I'll let the Debug guys decide. Ravi, if you want to skip statements, I suggest you go to the next line you want to suspend at, and use Ctrl+R which will cause the debugger to run up to that line and then suspend. This should work in the Java debugging case anyway and I suspect CDT should support this.
CDT/CDI debugger has a feature "Resume At Line" which allows users to resume the execution from the line selected in the editor. Is this what you are requesting?
Thanks for the immediate response. I'm working in Android Platform using Eclipse Galileo. The 'set next statement' functionality in VC++ works as described below: void method(){ if(false) //Line 1 System.out.println("Just right click in debug mode & set next statement to this line 2 & this statement will be printed"); } Description: As Line 1 would always be evaluated to false hence, line 2 should never execute normally but through 'Set Next Statement' feature, we can skip the execution of line 1 during debug mode & hence, execute Line 2 without checking Line 1. This 'Set Next Statement' can also be used to Jump to other methods in other classes as well. CTRL + R executes the statements & then, suspends which is similar to 'Run to Cursor' feature in VC++. As Android is based on Java, AFAIK CDT doesn't figure here. Thanks, Ravi.
Reassigning to JDT Debug.
Currently, this is not possible with the Java debugger as the native debug interface does not provide the ability to move/set the program counter arbitrarily.
Yes, accepted that there is no provision to set the program counter but Set Next Statement is a very much valuable feature for debugging & is an essential feature, leading to preference for particular IDE's. Kindly requesting you to consider this as an enhancement & provide this feature in future versions of Eclipse.
The java debugger cannot support this feature unless the underlying native debug interface supports it... JDI/JPDA does not support setting the next statement. http://java.sun.com/javase/6/docs/technotes/guides/jpda/index.html
For what it's worth, this could be done in CDT as GDB does support this. But that won't help with Android if I understand correctly.
Yes, Please provide it in CDT. Meanwhile, I've requested Sun for the native interface to support changing the program counter.
Not available in CDT till now. I've requested SUN(Oracle) to provide this useful feature but I've received no response so, not available in JDT also. Could you be of help to all the Java Developers?
(In reply to comment #10) > Not available in CDT till now. > I've requested SUN(Oracle) to provide this useful feature but I've received no > response so, not available in JDT also. > > Could you be of help to all the Java Developers? I'm not sure what you wish the Eclipse developers to do here. As Darin noted, the JPDA needs to spec this feature first. You need to engage and follow up with the Java community if you want this to happen. You may also wish to speak with the Android and Android tooling team. It may be possible for them to implement this feature on their side in the Dalvik VM.
(In reply to comment #7) > The java debugger cannot support this feature unless the underlying native > debug interface supports it... JDI/JPDA does not support setting the next > statement. > > http://java.sun.com/javase/6/docs/technotes/guides/jpda/index.html While not possible to set next statement anywhere, sometimes the most useful thing about this feature is to skip execution of a single method call. Maybe I'm way off here, but in JVM 6 there is an option to "Force Early Return" from a method: http://download.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ForceEarlyReturn So as a workaround, one could theoretically implement this with: * step into method * force early return immediately Optionally, you can do this several times to emulate "set next statment" as long as there is no "atomic" line of execution. Just an idea, not sure it would actually work.