Visual Studio 2013 debugging access issue with breakpoints - c++

I've been having an issue with debugging my C++ programs recently in Visual Studio 2013. Normally my programs will run fine, however, when I include a breakpoint at the end of my code in order to keep the console open, I will have to manually stop the debugging of the program afterwards (Shift + F5), which will consistently cause an error saying "The debugger was unable to terminate one or more processes: [4912] .exe: Access is denied. The debugger may be unstable now. It is recommended that you save all files and exit." If I go on to continue coding and then compile again later, it will fail to compile with the error that access is denied with fatal error LNK1168, saying it cannot open the .exe for writing. This only happens when I include a breakpoint in my code, so I'm wondering if there's a fix for this, or something that I'm doing wrong? Thanks.

Related

Launch Program "<.exe program path>" does not exist. C++ debugging Visual Studio Code

When i press debug, i always get this error. The program does not exist.
I have configured the launch.json file looking at different guides but still havent gotten rid of this issue.

unhandled exception access violation C++ Visual Studio before main is called

I'm getting the following error as soon as I click run to debug in Visual Studio 2013 . . .
I'm not sure how to proceed as I put a breakpoint on the first step in main and it does not hit this breakpoint.
History: I was handed a working program and was asked to integrate an updated dll. The dll had a couple I/O changes which I updated in the wrapper to enable the program to build. Now when I run I get the mentioned error.
Any next step advice as to what to check from here?

Unable to attach matlab.exe process to visual studio 2013 for debugging mex files?

I am writing some mex files to run in my matlab program using visual studio 2013 compiler.
In order to be able to debug your mex files, you should follow these steps
Everything was right just some minutes ago and I was doing my project without any problem.
Today I have typed the code
mex -g mx_minimum_power.cpp cvm_em64t_debug.lib
on command prompt many times and after getting the success message, I've attached matlab.exe to visual studio and through setting a break point, I've
debugged my code.
But this time I suddenly ran into the following error and I don't know how to solve it.
When I right-clicked on the third option and clicked run as administrator, I encountered the following message:
Then if I choose configure remote debugging, I'll encounter:
Now I have the following processes that are shown to be running.
and again:
When I click on permissions or options for remote debugger:
After running visual studio remote debugging monitor and getting the following message:
One should click the Find button in this window in order to find the msvsmon.exe that is being run on the subnet
and then choose MATLAB.exe, in the Available Processes list.

Visual Studio stops breaking on assert()

This started happening today for a Visual Studio 2013 project but I have seen it now and then over the years in other Visual Studio versions.
Running a debug build and for some unknown reason aborts stop raising the message dialog that allows you to break and debug and instead you simple get a message in the output window and the program terminates.
R6010
- abort() has been called
The program '[9408] test_explode.exe' has exited with code 3 (0x3).
Over many years as a C++ developer this gremlin pops up now and then and I always forget how I solve it and can't see what the cause was. I'm sure someone can shed more light on what's happening and the correct fix and at a minimum I'll at least add my own notes.
A manual call to _set_error_mode(_OUT_TO_MSGBOX) somewhere in my program restores the correct behaviour. So it appears the default error mode is being set wrong by some compiler option or Visual Studio setting? I'm just not sure what.
All Debug->Exception settings are enabled.

VS2010 Access Violation while step the code using F10 or F11

I have a C++ native code that run fine in Debug and Release mode. But there is a little problem, if I debug my program and set a breakpoint in my code visual studio stop on breakpoint then if I press F5 to continue run code run normally but if I press F10 or F11 visual studio catch an AccessViolation and program will be stopped due to the fact that exception is not anywhere in my code and I don't handle it.
This error will not occure in Console application but in MFC application or when I use a .NET EXE to debug my native DLL.
I have a 64 bit Win7 and VS2010 SP1.
Sorry!! I found a solution, you must turn off Tools/Options/Debugging/Native/Enable RPC debugging.
and every thing will go fine. But I don't know if I want to debug RPC calls to external server, what should I do, so if any one help me and find the reason of failure it will be great