在Visual Studio中跟踪代码流 [英] Trace a code flow in Visual Studio
问题描述
我们在VC ++ IDE中开发了C ++项目代码库。我可以编译并运行相同的。
We have our C++ project codebase developed in VC++ IDE. I can compile and run the same.
可执行文件涵盖了很多用例,因此包含许多流程执行路径。有没有办法在流程执行期间VC ++ Studio可以告诉我们流程中的方法被调用或跟踪流程。
The executable covers a lot of use cases and hence many flow executions paths. Is there a way by which during a flow execution the VC++ Studio can tell us which are the methods in the flow are called or trace the flow.
假设有3个函数被调用。在流程执行期间。我们可以得到一个跟踪,说明在执行过程中按顺序输入的3个函数吗?
Assume that 3 functions are called out of 10 during a flow execution. Can we get a trace stating the 3 functions entered during execution in order?
我知道VC中的调试工具,但跟踪是不同的。假设我正在开发代码库上的流量增强功能,该代码库分布在数千条线路上 - 如果我可以跟踪流量,那么在开发和分析
代码库期间我会快100倍,而不是从主要开始调试()。此外,由于有线程和异步事件调试这样的流程将是一个挑战。
I am aware of debugging tools in VC but tracing is different. Say I am working on a flow enhancement on a codebase that is spread across thousands of line - if I can trace the flow I would be 100 times faster during development and analyzing the codebase than to start debugging from main(). Further since there are threads and asynchronous events debugging such a flow will quiet be a challenge.
我正在使用Visual Studio Professional 2017版本15.5.1
I am using Visual Studio Professional 2017 Version 15.5.1
推荐答案
您好,
也许您可以使用调试器的调用列表。在要分析的流的末尾设置断点。当调试器停在那里你可以检查VS的调用列表。
Maybe you can use the calling list of the debugger. Set a breakpoint at the end of your flows that you want to analyze. When the debugger stops there you can check the calling list of VS.
问候,Guido
这篇关于在Visual Studio中跟踪代码流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!