Debugging namespace extensions with Visual Studio

What is the best way to debug a namespace extension using Visual Studio? It is not recommended to use regsvr32 to register and unregister the extension and to restart the explorer for each assembly. Attaching a debugger to an extension will be a good advantage.

Is there an easy way to debug a namespace extension using Visual Studio?

+3
source share
1 answer

If you run the explorer with something like explorer.exe /separate,::{desktopguid}\::{yourguid}, you should get a separate process for this window, and it should pick up new entries in the registry (or existing entries, if you just leave them there, you can add a GetWindowThreadProcessId(GetShellWindow(),...)!=GetCurrentProcessId()check and do not upload to the "main" shell process).

There are also some registry values ​​that you can change to change the behavior of the explorer: DesktopProcess , SeparateProcess, and BrowseNewProcess

To close the shell without killing the process in taskmgr, use this old trick: click "Start" and then "Shut Down". Hold Ctrl + Alt + Shift and press Cancel

+2
source

Source: https://habr.com/ru/post/1752828/


All Articles