Log in

View Full Version : unable to debug a shell extension


stax76
14th June 2019, 20:11
I developed a shell extension ten years ago in C++ and recently a severe bug was discovered, unfortunately I'm not able to start debugging.

The project uses x64 as output platform, under 'Debugging > Command' I entered C:\Windows\explorer.exe, when I start debugging the IDE don't go into debug mode. Maybe somebody here has experience with shell extensions and tell me what I miss. The code can be found here:

https://github.com/stax76/OpenWithPlusPlus

Where else could I ask for help, is this a valid question for stackoverflow?

LoRd_MuldeR
14th June 2019, 20:51
I think that is because "explorer.exe" (aka "the shell") is single-instance.

If you start "explorer.exe" again while there already is a running Explorer process, it just sends a message to the running instance and terminates right away. A new Explorer window belonging to the "preexisting" instance will pop up.

See here:
Debugging with the Shell (https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/cc144064(v=vs.85))

stax76
14th June 2019, 21:29
Thanks, I got it working with 'Debug > Reattache to process'. The bug I want to fix might be a windows bug. I was not able to find a solution for it but I can live with it since I'm not using this win+x menu anyway because launching things with keyboard is more efficient. My shell extension is not popular anyway, for me it's very useful. Fun fact is it's my only C++ tool/app, it can be done with .NET but needs too much memory.

https://windowsreport.com/winx-menu-not-working-windows-10/