问题
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.
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.
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?
回答1:
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, Ctrl+A, Ctrl+C. Switch to a text editor with the desired search wrangling features, and then Ctrl+V. 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.
来源:https://stackoverflow.com/questions/37661515/searching-call-stacks-in-visual-studio