I have an MMC snap-in that I am trying to debug. Currently, the following code, placed in the snap-in's constructor, works in terms of attaching the debugger to it:
public MySnapIn()
{
#if DEBUG
if (!Debugger.IsAttached)
{
Debugger.Launch();
}
#endif
...
}
But its really annoying to always have to attach a debugger to Visual Studio. I want to automate this process. Ideally, I would just have to hit F5 and it automatically attaches the debugger. I have tried the following:
This didn't work. The debugger won't attach automatically. How can I automate this process, or what's blocking the debugger from attaching automatically?
Just got it. As it turns out, you have to use the 32-bit MMC launcher on a 64-bit system (which I am on), and then add the -32 flag to the "Command line arguments" to force it to stay in 32-bit mode:
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