方法断点可能会大大减慢调试速度 [英] Method breakpoints may dramatically slow down debugging

查看:136
本文介绍了方法断点可能会大大减慢调试速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Whenever adding a breakpoint to the line of a method declaration (in Intellij IDEA or Android Studio), a popup appears:

方法断点可能会大大降低调试速度

Method breakpoints may dramatically slow down debugging

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

Why would it dramatically slow down debugging, is my question? What is different about putting the breakpoint on the first line of the function?

谢谢!

推荐答案

我环顾四周,在

方法断点

方法断点响应于程序进入或退出特定方法而起作用.它们使您可以通过要调查的方法而不是行号来确定调试会话的目标.方法断点使您可以在方法级别上遵循程序流程,并检查进入和退出条件.请注意,使用方法断点会降低正在调试的应用程序的速度.

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.

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

I guess it stops the program right before it enters the method, so that you can evaluate the parameters and such before entering the method.

它显着变慢的原因是(这是我可以收集到的,因为我可以在Intellij的文档中找到所有的方法 ),

The reason it dramatically slows down is (This is what I can gather, because that is all I could find on method breakpoints in Intellij's documentation) that it has to:

让您在方法级别上遵循程序流程,并检查进入和退出条件

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

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

and I suppose that would take a lot longer than just halting the program's execution

这篇关于方法断点可能会大大减慢调试速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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