# 监控调试器开销

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/idea/llms.txt).

> **TL;DR**
> 调试工具窗口：  `视图 | 工具窗口 | 调试`  或 `Alt+5` (Windows), `⌘ 5` (macOS), `⌘ 5` (IntelliJ IDEA Classic (macOS)), `⌘ 5` (macOS System Shortcuts), `Alt+5` (XWin), `Alt+5` (GNOME), `Alt+5` (KDE), `Alt+5` (Emacs), `Alt+5` (Sublime Text), `⌘ 5` (Sublime Text (macOS)), `Alt+5` (Visual Studio), `⌘ 5` (Visual Studio (macOS)), `Alt+5` (NetBeans), `Alt+5` (Eclipse), `⌘ 5` (Eclipse (macOS))

每次您 [求值表达式](examining-suspended-program.html#evaluating-expressions)或 [单步跳过代码](stepping-through-the-program.html)时，IntelliJ IDEA 会使用与调试的应用程序相同的资源，这可能会在特定情况下极大地影响整体性能。 例如，带有复杂条件的断点可能会显著增加执行一行代码所需的时间。

如果调试应用程序的性能不令人满意，请使用   开销  选项卡找出哪些调试器功能占用了最多资源。

Procedure: 隐藏/显示额外信息

* 要隐藏或显示   开销  选项卡，请点击 ![布局选项按钮](https://resources.jetbrains.com/help/img/idea/2026.3/app.debugger.restoreLayout.svg)，位于   调试  工具窗口的右上角，然后点击   开销  。

开销   选项卡为您提供有关每个调试器功能的命中次数和处理器时间的信息。 视图会动态更新，因此您不必暂停应用程序即可查看结果。

![调试工具窗口中的 Overhead 选项卡](https://resources.jetbrains.com/help/img/idea/2026.3/debug_overhead.png)

Procedure: 禁用调试器功能

如果您发现某个功能消耗了太多的 CPU 时间，您可以在   开销   选项卡中禁用它。

* 清除您要禁用的功能旁边的复选框。

![功能旁边的复选框可让你直接在“开销”选项卡上禁用这些功能](https://resources.jetbrains.com/help/img/idea/2026.3/debug_overhead_disable.png)

## 优化条件断点

使用条件的断点在过于频繁命中时可能会导致显著的开销。

当这种情况发生时，您可以用  `if`  语句和一个普通断点代替条件断点。

```JAVA
// hot loop
for (int i = 0; i < Integer.MAX_VALUE; i++) {
    System.out.println("some code");
    if (breakpointCondition) {
        System.out.println("Set breakpoint here");
    }
}

```

在代码中评估条件的速度更快，这可以显著提高调试应用程序的性能。

