Is it possible in Eclipse to define a set of breakpoints and only start them after the event?

I would like to set a set of breakpoints in several hard loops .. but I just want them to fire after a specific event occurs.

The problem is that all these breakpoints are defined in the module with a very low level, so they cannot know when a high level event occurs.

It would be ideal if I could set a special conditional breakpoint in the high-level code, so after this condition the breakpoint would start from now on to shoot at any other breakpoints found in the program (I Nevertheless, especially for this high level breakpoints).

Is there a way to do something like this? If not, how to get around this limitation? The only way that comes to mind is to define a temporary singleton to maintain state, and my low-level breakpoints depend on this singleton flag.

+4
source share
3 answers

If you right-click on breakpoint properties , you will see many options

breakpoint properties

+1
source

You can create ads using ads, but by default they are disabled in Eclipse.

Here is a good link explaining how to include statements: http://www.cis.upenn.edu/~matuszek/cit594-2004/Pages/eclipse-faq.html#assert

And here is more information on how to use them for your purposes: http://eclipse.dzone.com/articles/using-java-assertions-use

From the article:

Eclipse has a very useful mechanism for cracking Exceptions. This is another kind of breakpoint that fires when an exception is thrown, no matter how (and if) it is caught. If you use assertions, I highly recommend setting a breakpoint when approving fails to debug your code.

0
source

Here you ask a few different questions.

In response to “Q: can I set a breakpoint that fires when an event occurs”, you can see the “watchpoints”:

http://www.vogella.de/articles/EclipseDebugging/article.html

The same article discusses a possible answer to your other question: "Q: ... after this breakpoint condition has been met, from that moment it will start shooting other breakpoints ..."

Look for “breakpoint properties” in the same article.

'Hope this helps!

PS: Here is another short but very good article:

http://www.ibm.com/developerworks/library/os-ecbug/

0
source

Source: https://habr.com/ru/post/1382394/


All Articles