Debugview调试视图
The Debug viewshows the target debugging information in a tree hierarchy.
The numberbeside the thread label is a reference counter, not a threadidentification number (TID).
The CDTdisplays stack frames as child elements. It displays the reason forthe suspension beside the thread, (such as end of stepping range,breakpoint hit, and signal received). When a program exits, the exitcode is displayed.
The iconsthat appear in the Debug view include:
Description | ||
---|---|---|
Launch instance 运行实例 | Launch configuration name and launch type 运行配置名称和类型
| |
| Debugger instance 调试器实例 | Debugger name and state 调试器名称和状态 |
| Thread instance 线程实例 | Thread number and state 线程数和状态 |
Stack frame instance 栈帧实例 | Stack frame number, function, file name, and file line number 栈帧数,函数,文件名,和文件行数 |
Inaddition to controlling the individual stepping of your programs, youcan also control the debug session. You can perform actions such asterminating the session and stopping the program by using the debuglaunch controls available from Debug view.
Debugview toolbar options
The tablebelow lists the toolbar options displayed in the Debug view.
Description | ||
---|---|---|
Remove All Terminated Launches 移除所有终止了的运行作业 | Clears all terminated processes in Debug view 在Debug视图中清除所有终止了的进程 | |
| Connect to a Process 连接一个进程 | Enables the selection of a running process to debug. 使一个在运行的进程选中来调试 |
Restart | Starts a new debug session for the selected process 对选中的进程开始一轮新的调试会话 | |
Resume 继续开始 | Select the Resume command to resume execution of thecurrently suspended debug target. 对当前暂停悬挂的调试目标继续执行 | |
Suspend 暂停 | Select the Suspend command to halt execution of thecurrently selected thread in a debug target. | |
Terminate 终止(本地调试)
| Ends the selected debug session and/or process. The impact ofthis action depends on the type of the item selected in the Debugview. 结束选中的调试会话和或进程。这个动作的影响依赖于在Debug视图中选中的项目类型,即为STOP功能,与run | |
Disconnect 终止(远程调试) | Detaches the debugger from the selected process (useful fordebugging attached processes). 从选中的进程中退出调试器,主要指远程 | |
Step Into F5 | Select to execute the current line, including any routines, andproceed to the next statement.选择执行当前行,包括任意子程序(进入子程序单步执行),且处理到下一条语句 | |
Step Over F6 | Select to execute the current line, following execution insidea routine. 选择执行当前行,接着在子程序里面执行 | |
Step Return F7 | Select to continue execution to the end of the current routine,then follow execution to the routine's caller. | |
Drop to Frame 进入帧 | Select the Drop to Frame command to re-enter theselected stack frame in the Debug view. 使用该命令来重新进入到当前方法的开始处重新执行,并且上下文也相应回到初始时刻。 | |
Instruction Stepping Mode 汇编指令单步模式 | Activate to enable instruction stepping mode toexamine a program as it steps into disassembled code. 激活使能指令单步模式来检验一个程序,同时它步入反汇编代码 即当单步运行时,弹出汇编指令窗,一步一步执行汇编指令,同时c++代码也同步执行;强
| |
Use Step Filters | Select the Use Step Filters command to changewhether step filters should be used in the Debug view. 屏蔽过滤调不需要调试的代码 | |
Menu | Use the Debug view menuto:
|
ctrl+R 运行到光标所在行
Debugview context menu commands
Debug视图文本菜单命令
The Debugview context menu commands include:
Description | ||
---|---|---|
Copy Stack | Copies the selected stack of suspended threads as well as thestate of the running threads to the clipboard. | |
Find... | Opens the debug view element searching dialog. | |
Drop To Frame | Select the Drop to Frame command to re-enter the selected stackframe in the Debug view. | |
Step Into | Select to execute the current line, including any routines, andproceed to the next statement. | |
Step Over | Select to execute the current line, following execution insidea routine. | |
Step Return | Select to continue execution to the end of the current routine,then follow execution to the routine's caller. | |
Instruction Stepping Mode | Activate to enable instruction stepping mode toexamine a program as it steps into disassembled code. | |
Use Step Filters | Toggles step filters on/off. When on, all stepfunctions apply step filters. | |
Resume Without Signal | Resume program execution after receiving the signal. | |
Resume | Select the Resume command to resume execution of thecurrently suspended debug target. | |
Suspend | Select the Suspend command to halt execution of thecurrently selected thread in a debug target. | |
Terminate | Ends the selected debug session and/or process. Theimpact of this action depends on the type of the item selected inthe Debug view. | |
Terminate and Relaunch | Select the Terminate and Relaunch command to terminate theselected debug target and then relaunch it. | |
Disconnect | Detaches the debugger from the selected process(useful for debugging attached processes) | |
Remove All Terminated | Clears all terminated processes in Debug view | |
Terminate and Remove | Terminates the selected debug target and removes it from theview. | |
Terminate/Disconnect All | Terminates or disconnects all active launches in the view. | |
Properties | Opens the Properties for windowshowing the process properties. |