I use stackwalk64 to generate stacktraces for C++ in visual studio 2008 using the latest symchk.exe and dbghlp.dll. This works fine when I'm running the standalone exe. However, when the debugger is attached I deadlock visual studio. I previously had a workaround where I downloaded all of the system32 symbols to disk and this worked well, but a recent update seems to have broken my workaround even though I updated the symbols. Ideally I would like to determine if the visual studio debugger is attached (it will only ever be the VS debugger) so I can turn off my stack traces in that case. Thanks for any help.
Kernel-mode code can determine the status of kernel debugging by using the following variables and routines: The KD_DEBUGGER_ENABLED global kernel variable indicates whether kernel debugging is enabled. The KD_DEBUGGER_NOT_PRESENT global kernel variable indicates whether a kernel debugger is currently attached.
Just Delete the . vscode file from the directory you are working in and reopen the window the debugger will be gone.
In the Options dialog box, choose Debugging, Symbols, select the Microsoft Symbol Servers check box, and then choose the OK button. The Processes dialog box appears. Select the Show processes from all users check box. In the Available Processes section, choose the process for your service, and then choose Attach.
When debugging is complete, you can detach the debugger from the process by clicking Debug, and then clicking Stop Debugging in Visual Studio.
Use IsDebuggerPresent
and possibly CheckRemoteDebuggerPresent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With