How can I programmatically examine the stack in my Visual Studio extension?
问题 In a VS extension, assume that the code has just hit a breakpoint, and is in break mode. How can I programmatically examine the stack? Also, is there a way to figure out what the last executed statement was? I haven't been able to find an advanced sample. There are hello-world type samples but they are mostly focused on adding/modifying UI elements in Visual Studio IDE. 回答1: You'll need to hook into the EnvDTE.Events.DebuggerEvents.OnEnterBreakMode event or equivalent to know when the process