Debugging my Custom Debug Engine is Failing in VS2012, but not in VS2005. RRS feed

  • Question

  • I have created a new Visual Studio project type and a corresponding debug engine. I am trying to port my project fully to VS2012. It originated in VS2005, and was ported to VS2008, and now VS2012. I am running into an issue when debugging my custom debug engine where VS2012 fails to attach to the DE's process. I am performing the below steps:

    1. Start the msvsmon remote debug monitor, and set it to "no authentication".

    1. Open my custom project type in VS2012.

    2. Start debugging my custom project which spawns my DE process.

    3. Open a separate instance of VS2012.

    4. Go to Debug->Attach to Process.

    5. Select Remote (no authentication).

    6. Connect to my machine's debug monitor, and select our custom debug engine from the process list.

    7. When I click "Attach", it tries to attach before throwing the error, "Unable to attach to the process. A debugger is already attached."

    When I perform these exact same steps except use VS2005 in step 3, the process attaches and works as expected.

    I've scoured the internet for solutions, but haven't found any for my situation. I am not running the DebugDiag tool, which has caused some people to have similar issues. When I check the System.Diagnostics.Debugger.IsAttached in my DE, it says "false".

    Has something changed in VS2012 where the DE thread gets associated with the debug session that spawned it? Is there a setting buried somewhere that could help with this? I have tried it with "Managed C++ Compatibility Mode" enabled and disabled.

    Any leads would be appreciated as I am thoroughly stuck.

    Wednesday, September 16, 2015 6:38 PM

All replies

  • Hi mrjonathansiegel,

    Have you closed all the related programs before you debug it?

    Best Regards,
    Li Wang

    Friday, September 18, 2015 5:57 AM
  • Yes. The only programs I had open were the two instances of Visual Studio.
    Monday, September 21, 2015 5:18 PM