score:2
You could always change the value of the class that is about to have a method called to a Mock version of it.
You can do this by right clicking on it in the Variables panel and selecting Change Value
. In the window you can then enter something like:
new SomeClassMock()
Of course this assumes that you have Mock classes already in your classpath (and it sounds like you don't.) However you could certainly create a JAR full of the Mock classes that you need and shove it in the Tomcat shared lib so that you can access it. Not sure if this works but you get the idea.
score:4
You can set breakpoint conditions that will determine whether or not this breakpoint will stop or will continue on. I don't know of any way for you to tell it to skip the next few line without changing the code to something like:
if ( !skip ) {
// contents to be skipped
}
and then at the breakpoint set skip
to true.
For the breakpoint conditions, if you return true
will stop and return false
will continue. In here you can actually execute code and do whatever you want (including setting the value of skip
).
score:4
I had a similar problem in that I wanted skip some code so that I can get the result of the method call happening later in the code. I forgot that when you are debugging, you can create expressions and evaluate them at anytime. In Eclipse there is an "Expression" tab where you can enter any expressions (i.e. method calls) that you want evaluated.
This meant that I did not have to skip the lines, as I was able to evaluate what I wanted as soon as I entered the appropriate method.
score:14
If you are debugging, you can comment out the line you want to skip and then recompile, which will hotswap the code and keep you within the method you are currently in, allowing you to skip the line.
Depending on what you want to have happen, you could simply execute the line after the one you want to skip, select the code and choose Display from the r-click menu. This will execute the selected code and provide the result in a popup.
Source: stackoverflow.com
Related Query
- How to skip a statement in Eclipse during debugging
- How to execute some function in eclipse while debugging a java program?
- Android NDK debugging in Eclipse - how to stop segfaults/SIGILL that only occur when stepping in native code
- Skip some file during compilation Eclipse
- How can I skip JRE code when debugging in Eclipse?
- How to skip loops while debugging Java code?
- How to configure Eclipse to skip Exceptions in debug mode?
- eclipse - search value of variable during debugging
- Eclipse CDT multithreaded debugging not-optimal - how does one run threads exclusively?
- How to set up the Eclipse for remote C debugging with gdbserver?
- How to do remote debugging with Eclipse CDT without gdbserver?
- Eclipse - how to start remote debugging without automatically rebuilding
- How to setup remote debugging with Eclipse and PyDev
- How to come out of while loop during debugging
- How to terminate android application while debugging in eclipse
- Eclipse hangs during debugging with "Evaluating" thread
- On Linux, Debugging a C++ application with gdb in Eclipse CDT, how to input something to stdin?
- How to set up spring source code for debugging in eclipse
- How to stop debugging in Android application in Eclipse
- How to SKIP a maven plugin execution from Eclipse Build Workspace
- How to use Eclipse for remote debugging of a Google App Engine (GAE) application
- How to debug Groovy code via the remote Java application debugging in Eclipse
- Remote debugging using Eclipse - How to set breakpoints?
- How to filter ressources during build in Eclipse project?
- how to access a text file while debugging with eclipse CDT
- How to disable eclipse switching to debug view while debugging
- How to ignore/prevent javadoc folder from validation during Eclipse Build?
- How to change value of a HashMap while debugging in eclipse
- How to skip eclipse validation of folders for building workspace(Luna Edition)
- How to unzip an archive during Eclipse plugin installation using p2 touchpoint instructions
More Query from same tag
- Eclipse Plugin Development: IMarker no text highlight
- Java Build Path
- Cocos2d: Activity class & CCLayer class
- Eclipse - sharing project directory with multiple users
- Eclipse plug-in not working when deployed
- Android maven missing artifact errors
- JavaFx ml Eclipse
- adding a cover page to a csv/excel file in python
- Running a Spring MVC app in tomcat 7.0 gives me HTTP Status 404 : requested resource is not available.
- Image Hosting On Apache Tomcat
- Error when installing plugin in Eclipse
- No JUnit tests found in Eclipse using Groovy + Cucumber
- Eclipse/Kotlin identifying just some needed imports
- Eclipse activity_main.xml and my test phone is showing different theme Android
- Spring Tool Suite 4.7.1 editor bugs after update
- How to register existing Glassfish server in Eclipse?
- Generate Tables from Entities results in NoInitialContextException
- msSQL jdbc .. I connected to the server but how to connect to use a specific databaseName
- noclassdefFoundError after running update
- how to swap clipboard content with selection upon keyboard shortcut
- Eclipse does not detect my sony xperia C2004 device
- i keep getting this error at the first line of my configuration file in spring project
- How can I run a Maven webapp in Eclipse when I need resource filtering for properties files?
- Exception using Eclipse, GlassFish and Apache CXF
- What are the differences in "debug as" vs exported APK
- How to navigate up/down using keyboard home keys in Eclipse's suggestions pop up window?
- Appium Java testNG Framework: driver cannot be resolved to a variable
- How to import RapidMiner JARs in Eclipse?
- Type 'ssize_t' could not be resolved eclipse cdt
- How to access JBOSS Restful web service using IP and Port