IntelliJ Idea(调试)条件断点依赖于其他断点 [英] IntelliJ Idea (debugging) conditional breakpoint dependent on other breakpoints

查看:1113
本文介绍了IntelliJ Idea(调试)条件断点依赖于其他断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果激活了另一个先前的断点,我想在IntelliJ Idea中设置一个仅处于活动状态的调试断点。
例如我在第10行有一个断点 B1 ,在第20行有另一个断点 B2 。即使B2s条件为真,调试器也应该只停止B1s之前的情况是真的。

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.

在Idea中是否可以这样?

Is something like this possible in Idea?

更新:

目前我正在使用此解决方法:

Currently i'm working with this workaround:


  1. 设置两个断点

  2. 禁用断点#2

  3. 启动调试器,等到断点#1处于活动状态

  4. 激活断点#2

  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 :)

推荐答案

您可以在查看断点... 视图中执行此操作:

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

在您的情况下,您首先必须在 B1 上设置条件断点,以便在喜欢它时然后才会触发 B2

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.

这篇关于IntelliJ Idea(调试)条件断点依赖于其他断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆