IDEA Debug操作指南
2019-10-13 本文已影响0人
JAVA觅音阁
IDEA Debug 操作相关的快捷键
快捷键 | 中文描述 | 英文描述 |
---|---|---|
F7 | 单步运行 进入方法体 | Step Into |
F8 | 单步运行 不进入方法体 | Step Over |
Shift+F7 | 智能步入 选择进入方法体 | Smart Step Into |
alt+F9 | 运行到光标 | Run to Cursor |
F9 | 运行到下一个断点 | Resume |
cmd+F8 | 添加普通断点 | Toggle Line Breakpoint |
cmd+shift+F8 | 查看/编辑断点 | View Breakpoints |
F2 | 修改变量值 | Set Value |
alt+F8 | 运行表达式求值 | Evaluate Expression |
说明:以上F7和Shift+F7的区别,若断点处同一行代码,存在多个方法调用。F7会按调用顺序进入方法体,而Shift+F7则会弹出方法选择,可以自行选择进入的方法体。
IDEA Debug 窗口描述

- 方法调用栈窗口:Frames
- 变量窗口:Variables
- 变量查看窗口:Watches
IDEA Debug 常用操作

- 条件断点
- 计算表达式
- 回退重演,Drop Frame
- 终止Debug,Force Return
IDEA Debug 多线程
设置拦截多线程

简单示例

Debug效果
