The program 'xxx' has exited with code -55 (0xffffffc9) - visual-studio-2017

When pressing 'Start' to debug my application (currenly in WPF app, it happens with Console Apps too) the blue bar at the bottom changes to orange and says 'Loading symbols for mscorlib.dll' which then gives me this in the output window:
'xxx' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.
The program '[20892] xxx' has exited with code -55 (0xffffffc9).
However when I spam press 'Start' over and over again it eventually comes in a debugging sate and opens an actual window.
Configuration Manager is on Debug & Any CPU.
Loading the .exe from the debug folder works just fine, using CTRL + F5 also works just fine.
Uninstalled all my Visual Studio versions and only installed 2017 Community back on my system and it still happens.
Searching for error code -55 doesn't give me anything either. Any help is appreciated.

The solution to the problem was removing Malwarebytes from my machine. As pointed out by Hans Passant.
Details:
Be sure to restart your machine after uninstalling the software.
I tested VS2015 Community and that ran just fine with the software installed.

Related

How to attach Visual Studio to Unity in order to debug a native dll?

I have a native dll which is used by a project in Unity 2019.4.35f1. Since the logic in the dll is complicated I would like to be able to debug it.
From the main answer here
https://answers.unity.com/questions/30620/how-to-debug-c-dll-code.html
I was able to log debug from inside the dll.
From the answer from this thread by Tomas1856, a Unity Technologies superuser, I get that the only way to really debug the native dll code line by line is to attach a debugger to the executable.
https://forum.unity.com/threads/how-to-step-into-a-native-c-dll-in-visual-studio.413387/
The problem is that I am not able to.
I have the dll Visual Studio 2019 project. It is build in debug mode. It's pdb file is here. I have tried changing many project settings from advices I have read on the internet including on stackoverflow. But still when I press the play button in Unity and press the Attach to Process in Visual Studio the breakpoints I have put in the dll code all turn white with an error message "The breakpoint will not be hit. No symbols have been loaded for this document".
I am attaching to the Unity.exe process. I have tried changing the output path for the dll and the pdb.
I am pretty sure I am missing something obvious.
Can someone provide any guidance, please?
After a month I have accidently found the reason. Error Pause was activated. I have logged an error so the Game has paused which makes it impossible to attach to the Unity process. I hope this helps anyone.

Visual Studio 2015 freezes when debugging a cpp code

I've installed Visual Studio 2015 Enterprise. I'm trying to create a c++ OpenGL project, however, it always freezes when I'm debugging(ctrl + f5). I've tried to write a simple program that prints text to the screen and it still freezes. The build completes successfully, projects in C# don't freeze as well. When I'm trying to run the cpp project VS freezes completely and I have to kill the process, running the .exe directly freezes the explorer..
I haven't found any solution to that kind of problem in the web, and I was hoping that someone here will know what to do..
Thanks :)
Try setting a breakpoint on the very first line of your main, click on debug and see if it gets to the breakpoint. If it does, try stepping through until you see what is causing your freeze.
I had exactly the same problem as you. Turns out my Avast anti-virus was causing the issue. I disabled it and now it's working.
I found the answer from this question:
Visual Studio 2015 freezes when finished building

Microsoft Visual Studio 2010 Cannot find or open the PDB file- McAfee

I am trying to debug my C++ program in Microsoft Visual Studio 2010- having just recompiled the code after making some changes, have run the program, and am now trying to attach to the process (Debug -> Attach To Process...).
However, when I do this, I am presented with an error that I've never seen before:
'AMSCDNUSimulatord.exe': Loaded 'C:\Program Files (x86)\McAfee\Host Intrusion Prevention\HcApi.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x1c04) has exited with code 0 (0x0).
I haven't done anything differently to what I normally do (built the project, copied the 'AMSCDNUSimulatord.exe' (debug executable for my program) from the workspace to the release folder of the program- overwriting the existing .exe file), run the program, and attached to process from Visual Studio's Debug menu.
This usually works with no problems at all- but for some reason, I'm now getting the above error in Visual Studio's console... Anyone know anything about this?
I haven't changed any configuration of McAfee or anything, so can't think why it would be complaining about that.
I have tried checking the "Microsoft Symbol Servers under Symbol Locations" as suggested in answer to: Visual Studio 2010 "Cannot find or open the PDB file", but this doesn't seem to have made any difference.
With regard to the set up of my project, the source is in the folder C:\Workspace\Simulator, and that is where the .exe file is placed when the project is built. I am then running the release from C:\workspace\release\Simulator, so I copy the .exe from the first folder to the second once it's built, and run it from there. The thing is, that I've been following that method exactly for months, and never had any problems running the program and attaching to the process before, so I doubt that the issue is anything to do with the change to that I've made to the code... but how/ why would McAfee now be preventing me from attaching to the process?

Visual Studio test host does not load debug information

I am attempting to run a C++ unit test in Visual Studio 2008. While the test seems to run fine, when I attempt to debug it (after compiling in debug mode) I get the following message:
Debugging information for VSTestHost.exe cannot be found or does not match. Cannot find or open the PDB file.
This happens even if I open a completely new, empty unit test. The same happens in Visual Studio 2010 and 2012, with the test host being QTAgent32.exe and vstest.executionengine.x86.exe, respectively. If I inspect the test host process (VSTestHost.exe) using ProcessExplorer while the dialog appears, I see it is running in its own directory (Common7\IDE under the Visual Studio installation directory). Copying the PDB file there however does not help.
I stress again that this happens with a clean and empty test. How do I make the test host process load the test project's PDB file?
Turns out this message can be ignored. While the host process is indeed without debug information, the test project's PDB file should be loaded correctly, so that breakpoints in the test code will be hit.

Visual Studio is not loading modules when attaching to process

I have a C++ application. When i press F5 in visual studio application starts and i can debug it. But when I run application from windows explorer and then attach this process in visual studio I see breakpoints can be hit (they are completely red) but breakpoint does not hit. When I see modules window nothing is present there. What is problem?
Verify the code type Visual Studio is configured to load symbols. Attach To Process dialog has Select Code Type option to specify which symbols to load. Here you can select Managed symbols and/or Native symbols.
Also the assemblies should be of same version.
It sounds like the executable code that you are debugging (F5) is not the same as the one you are running from explorer. Check the date of the executable you are running. Also, it may be picking up a different version of DLL if you are using them. Try renaming one of your DLL files and then running from explorer. Use depends.exe to see which modules are being loaded.