gpt4 book ai didi

java - 方法断点可能会大大减慢调试速度

转载 作者:IT老高 更新时间:2023-10-28 20:35:51 26 4
gpt4 key购买 nike

每当向方法声明的行添加断点时(在 Intellij IDEA 或 Android Studio 中),都会出现一个弹出窗口:

Method breakpoints may dramatically slow down debugging

为什么它会显着减慢调试速度,是我的问题吗?将断点放在函数的第一行有什么不同?

谢谢!

最佳答案

我环顾四周,在 Intellij Documetation 中看到了这篇帖子:

Method Breakpoint

Method breakpoints act in response to the program entering or exiting a particular method. They let you target your debugging sessions by method you wish to investigate, rather than by line number. Method breakpoints let you follow the program flow at the method level as well as check entry and exit conditions. Note that using method breakpoints can slow down the application you are debugging.

我猜它会在程序进入方法之前停止程序,以便您可以在进入方法之前评估参数等。

它显着变慢的原因是(这是我可以收集到的,因为这是我在 Intellij 文档中的方法断点上可以找到的全部)它必须:

let you follow the program flow at the method level as well as check entry and exit conditions

我想这比仅仅停止程序的执行要花更长的时间

关于java - 方法断点可能会大大减慢调试速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31062069/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com