问题描述
我正在使用Visual Studio调试大型多线程C ++应用程序.我试图找出哪个线程运行了我感兴趣的功能.
I am using Visual Studio to debug a large multithreaded C++ application. I am trying to find out what thread ran a function I am interested in.
我有40多个线程,其中一些线程的调用栈很长.因此,手动检查单个调用堆栈以查看它们是否包含我的函数确实很繁琐.
I have more than 40 threads, some with really lengthy call stacks. So, manually inspecting individual call stacks to see if they contain my function is really tedious.
我想知道Visual Studio是否支持搜索调用堆栈,就像它支持搜索源文件一样.您能告诉我如何在VS中搜索调用堆栈吗?
I was wondering if Visual Studio supports searching call stacks like it supports searching source files. Could you please tell me how to search call stacks in VS?
推荐答案
不,我不知道有任何方法可以在Visual Studio的查看器窗口中搜索调用堆栈.
No, I don't know of any way to search the call stack from within Visual Studio's viewer window.
为此,我使用了一种技术含量较低的解决方案:将调用堆栈"窗口置于焦点上,将 + , + .切换到具有所需搜索整理功能的文本编辑器,然后再选择 + .是的,很好的旧复制粘贴.有用.获得调用堆栈的文本表示形式还有其他几个优点,包括保存不同的调用堆栈,进行比较并将它们发布到堆栈溢出"问题的能力.
I use a rather low-tech solution for this: with the Call Stack window focused, +, +. Switch to a text editor with the desired search wrangling features, and then +. Yup, good old copy-and-paste. It works. Obtaining a textual representation of the call stack has several other advantages, including the ability to save different call stacks, diff them, and post them to Stack Overflow questions.
这篇关于在Visual Studio中搜索调用堆栈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!