microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
816 stars 218 forks source link

'Hit F5' is not enough as guide suggests #52

Open phofman opened 9 years ago

phofman commented 9 years ago

The initial guide suggests that debugging MIEngine could be started automatically as soon as F5 is hit, when solution is opened. That's not correct for me and should be updated. Or am I doing something wrong?

I noticed that MIEngine actually shares the same GUIDs as VS build-in MDD debug-engine used for Android development (which RTM version doesn't work for me neither; can't start debugging on my 2 non-VM machines, failing with 'Reference not set to an instance of object' exception). That's why MIEngine is never loaded, then no breakpoints are working etc.

Very first step is actually following redistribution instructions to customize the GUIDs. Then it works as expected.

gregg-miskelly commented 9 years ago

Are you running in the experimental instance? You can verify that by confirming that:

  1. The startup project is MIDebugPackage
  2. If you go to debug properties for that project, you see that --
    • The 'Start Action' is 'Start External Program' and that the external program is the path to devenv.exe
    • The command line arguments are '/rootsuffix Exp'
    • If you

Yes, the MIEngine is the engine used for Android development.

phofman commented 9 years ago

Hi Gregg,

Yes, I am pretty sure I am running experimental instance and solution setup seems to be fine.

Honestly, after a manual clean it started to behave (sometimes) as expected and I can debug MIEngine invoked from my plugin (sometimes). So I don't want to waste too much of your time.

I mean sometimes as for example - after 'F5' everything always builds fine, but few times I got this error, while starting debugging:

debugging

Also something not related to initial problem is - by clicking 'Rebuild Solution' all fails unexpectedly doing some IL magic in JDbg. I didn't investigate it further.

rebuild

Or while opening the VSIX manifest file I got errors:

manifest


If I look at regular VS instance, Android project builds fine:

android_build

But debugging fails unexpectedly (all under official MIEngine distributed with VS, NOT experimental build):

android_deployment

I already reinstalled the cross-platform SDK twice and the error seems to be persistent.