IntelliJ Idea (debugging) conditional breakpoint dependent on other breakpoints

你说的曾经没有我的故事 提交于 2019-12-03 15:04:28

问题


I want to set a debug breakpoint in IntelliJ Idea that is only active, if another previous breakpoint was activated. For example i have a breakpoint B1 on line 10, and another breakpoint B2 on line 20. Even if B2s condition is true, the debugger should only halt if B1s condition was true before B2s.

Is something like this possible in Idea?

Update:

Currently i'm working with this workaround:

  1. set the two breakpoints
  2. disable breakpoint #2
  3. start the debugger, wait until breakpoint #1 is active
  4. activate breakpoint #2

I hope there is a cleaner way to do this :)


回答1:


You can do that in the View Breakpoints... view:

In your case you will first have to set a conditional breakpoint on B1 so that when it is hit then and only then B2 will be triggered.



来源:https://stackoverflow.com/questions/16607556/intellij-idea-debugging-conditional-breakpoint-dependent-on-other-breakpoints

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!