Breakpoint Properties in Eclipse
Join the DZone community and get the full member experience.
Join For FreeThe Eclipse IDE has the ability to run the code interactively, executing an application line by line in debug mode where you can define a specify point in the code to stop, called a breakpoint. As you can see in Eclipse documentation:
But when you are debugging an application, sometimes, you don't want the application to stop everytime in the breakpoint. For example, in a loop where the code iterates through a lot of object.
The solution for these situations is conditional breakpoint. To set a conditional breakpoint, right-click on breakpoint in the left hand side and click "breakpoint properties.." in Eclipse.

After that you'll see the following screen:

You set a condition in a breakpoint so that it will stop at this point when the condition is true. In this example, the application will be suspend when the request's method is "POST".
There are others options to set a condition in the breakpoint, for example, the count of hit the application.
So, that's it. Did you know about this tip or any other interesting features in Eclipse?
"A breakpoint suspends the execution of a program at the location where the breakpoint is set".
But when you are debugging an application, sometimes, you don't want the application to stop everytime in the breakpoint. For example, in a loop where the code iterates through a lot of object.
The solution for these situations is conditional breakpoint. To set a conditional breakpoint, right-click on breakpoint in the left hand side and click "breakpoint properties.." in Eclipse.

After that you'll see the following screen:

You set a condition in a breakpoint so that it will stop at this point when the condition is true. In this example, the application will be suspend when the request's method is "POST".
There are others options to set a condition in the breakpoint, for example, the count of hit the application.
So, that's it. Did you know about this tip or any other interesting features in Eclipse?
Eclipse
application
Property (programming)
Execution (computing)
Debug (command)
Documentation
Requests
Integrated development environment
Object (computer science)
Opinions expressed by DZone contributors are their own.
Trending
-
Observability Architecture: Financial Payments Introduction
-
How To Check IP Addresses for Known Threats and Tor Exit Node Servers in Java
-
VPN Architecture for Internal Networks
-
What Is Istio Service Mesh?
Comments