5

I'm having two problems which center on the debugger. I'm not sure if they share the same cause but they definitely seem related.

  1. When I open my solution in Visual Studio Enterprise 2015, I get this message: Automatically attaching to support this behavior was not completely successful
  2. When I start the program directly from the executable and try to attach to the process in visual studio, I get this message: Unable to attach to the process. No more data is available.

After dismissing the message box I get in step 2, the IDE definitely thinks it's attached to something. The Debug toolbar shows active Break All and Stop Debugging buttons and I can select Debug > Detach All. It's not hitting any of the breakpoints I set.

Per Jeremy's answer, I went to Debug > Windows > Modules and it showed nothing in the list. The debug output also immediately says the program exited with code 0 (bottom left of that screen cap).


The following are related questions and answers I've come across. None of the posted solutions worked.
  • This question is only kind of similar and I set VS to always run as administrator.
    • This answer to that question led me to modify the Debug Programs policy in User Rights Assignment to include my account. It previously only included the Administrators group which my account is part of but I took a shot.
  • This question is similar to bullet 1 above. My Visual Studio is completely up-to-date. I also tried enabling SQL Server debugging as some of the answers suggested but that didn't do anything.
Community
  • 1
  • 1
Jason
  • 372
  • 1
  • 4
  • 14

1 Answers1

3

It's going to be something like:

  1. The Symbols aren't loaded. Debug menu > Windows > Modules and confirm

  2. There are no pdb files. Check you're building in Debug Mode

  3. Goto Project properties > Debug > check the settings and Enable Visual Studio Hosting Process is ticked

  4. Goto Project properties > Advanced Build Settings and make sure Debug Info is set to Full

  5. Also check the import settings wizard (if you're missing menus):

enter image description here

  1. The wow64 emulation layer that allows 32-bit code to run on the 64-bit version of Windows 7 swallows exceptions in the code that runs in response to a notification generated by the 64-bit window manager, like the Load event. Preventing the debugger from seeing it and stepping in. https://stackoverflow.com/a/4934010/495455
Community
  • 1
  • 1
Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321
  • I don't have the 'Modules' option you mentioned in 1. [This is my menu](http://imgur.com/d1YcDbC). I'm building in debug and I checked a few output folders for PDBs just to be sure. Every project has Enable Visual Studio Hosting Process ticked and Debug Info is set to Full for all of them. – Jason Apr 28 '16 at 13:47
  • The project has been around for years and it even worked fine on my old computer, it just isn't working on my current computer. Out of the few engineers who got new computers, I'm the only one with this problem. – Jason Apr 28 '16 at 13:51
  • Hmm, weird. By wrong template I meant Import settings as seen in the pics in this post: http://stackoverflow.com/questions/31604119/visual-studio-test-missing-from-the-main-menu – Jeremy Thompson Apr 28 '16 at 13:57
  • 1
    Ah I see. I'll have to look into that. I missed a couple of details in my original post and have since found the Modules option, which is showing nothing. I'll edit the question to include those details. – Jason Apr 28 '16 at 13:59
  • I just reset to the Visual C# configuration and that didn't resolve the problem. – Jason Apr 28 '16 at 14:16
  • To save you from reinstalling or at worst case rebuiling see my point number 6. – Jeremy Thompson Apr 29 '16 at 02:18
  • Note that the 'Modules' option will only be available in the _Debug > Windows_ menu while your application is running. Try _Tools > Options... > Debugging > Symbols_ before the app starts for similar symbol loading options. – g t Nov 11 '19 at 07:00