简体   繁体   English

调试时如何跳过汇编代码?

[英]How to skip assembly code when debugging?

Sometimes when I use the debugger to step through my code, it goes into some assembly code (I guess I've stepped into some system library code). 有时,当我使用调试器单步执行代码时,它会进入一些汇编代码(我想我已经进入了一些系统库代码)。

The question is, how can I skip over it and jump to the nearest c++ code of my project? 问题是,如何跳过它并跳转到项目中最接近的c ++代码?

Use the "Step-out" button or Shift+F11, this will step back up the call stack. 使用“退出”按钮或Shift + F11,这将逐步备份调用堆栈。

Alternatively display the call stack (Alt+7), then double click on the function level you want to return to; 或者显示调用堆栈(Alt + 7),然后双击要返回的功能级别; this will indicate in the source window where the call was made. 这将在源窗口中指示调用的位置。 Then in the source window right-click the statement following the call, and select "Run to cursor". 然后,在源窗口中,右键单击该调用后的语句,然后选择“运行至光标”。 Of course if you already know where the call came from, you could just use "Run to cursor" in any case. 当然,如果您已经知道呼叫的来源,则在任何情况下都可以使用“运行至光标”。

You can close that assembly window by clicking X on right side in the code window. 您可以通过单击代码窗口右侧的X来关闭该程序集窗口。 Not the one at top most right(which closes the solution) 不是最右边的那个(这将关闭解决方案)

Jump Out of the current function? 跳出当前功能? (Shift-F11 in the C++ settings?) (在C ++设置中为Shift-F11键?)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用gdb调试时,汇编代码前面的调试信息是什么意思? - When debugging with gdb, what is the meaning of the debugging information in the front of the assembly code? 如何在调试时将Visual Studio配置为“跳过”智能指针代码? - How do I configure Visual Studio to 'skip' smart pointer code when debugging? 如何使QtCreator在调试而不是汇编时显示“正常”代码? - How to make QtCreator show “normal” code while debugging instead of assembly? 在 Visual Studio 2012 中调试 C++ 代码时跳过 STL 代码? - Skip STL Code when debugging C++ Code in Visual Studio 2012? 如何让 VS Code 在调试时不打开终端? - How to make VS Code not open a terminal when debugging? 在 Visual Studio Code 中调试 C++ 时如何读取输入? - How to read input when debugging in C++ in Visual Studio Code? 代码仅在调试时有效 - Code working only when debugging 如何在Visual C ++ 2013中跳过调试所有std命名空间? - How to skip debugging all of std namespace in Visual C++ 2013? 调试程序集时,如何在VS2019监视窗口中将内存地址转换为用户定义的类型? - How can I cast a memory address to a user defined type in the VS2019 watch window when debugging assembly? C ++添加仅在调试时运行的调试代码 - C++ adding Debugging code that only runs when Debugging
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM