Codeblocks(IDE) with debugger from VS - c++

How can I plug debugger from VS to Code::Blocks?
Really couldn't find anything on the web.

Go to the code block (<%%>) in Visual Studio and press F9 on your keyboard to insert a breakpoint.

Related

Keyboard shortcut for debugging the LAST test run in Visual Studio IDE (2013)

I know there are several VS keyboard shortcuts for running unit tests, but the one I really can't find and would like is to be able to run the last executed test in debug mode.
Ctrl+R, L will repeat the last run, but not in debug mode.
If you are debugging a test, and it changes context to the code you are actually running, and then you stop the test, is there a way to start that test in debug mode again using just the keyboard?
I wanted the same thing.
Based on the technique found in the following post
Visual Studio 2012 debug tests keyboard shortcut
I searched for TestExplorer.DebugSelectedTests and assigned a shortcut key to it.
At least in VS2015 (and hopefully in VS 2013) even while debugging changes context to the code you are actually running. The test remains selected in the test explorer window. So, you can run your shortcut key combo and the test will debug again.
Hope this solves the problem for you too.
I know this question was for Visual Studio 2013, but got google go me here.
In Visual Studio 2019 is a shortcut for that Ctrl+R,D:
If you are using ReSharper, you can use Ctrl+U, D to rerun a test in Debug mode.
https://www.jetbrains.com/resharper/features/unit_testing.html

Cannot stop the debug

Hi I am using the Microsoft Visual Studio. I started the debugging process by hitting F5. I would want to stop the debug without stopping the application(Visual Studio). Any help is appreciated.
Shift+F5 or Stop Debugging will terminate the process.
Instead you want the Detach All command from the Debug menu.
shift + F5 in keyboard shortcut or click stop debugging button at the top right corner of the visual studio

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

What is different between visual studio F5, ctrl+F5, or running outside of visual studio?

I have written a program in vc++ that has different behavior in various case as below.
When I run it by F5 it works properly in release mode.
When I run it by ctrl + F5 it crashes when I start to send data to the program.
Outside of visual studio it crashes immediately.
I don't know how to find the bug. Any idea on
what is different between these cases?
Running ctrl + F5 will run the application without debugger.
(http://msdn.microsoft.com/en-US/library/8b59xk0f(v=vs.90).aspx)
This is not the same as running in release mode.
You can run your application in debug mode but without debugger.
It sounds stupid but is for example helpful if you want to stop the console from closing on exit. (How to stop console from closing on exit?)
You need to understand the difference between running an application in debug mode and release mode. F5 will generally help you to debug the application and ctrl + F5 will execute the application. There might be some issues in release mode that makes your vs to crash. Read this to get an understanding.

Visual Studio debug ghost cursor - program enters debug but cannot see current line nor variables

Strange situation when I am debuging a C++ application in Visual Studio.
I have set a breakpoint in my file and started debug, and run the scenario.
The application enters debug mode in visual studio at the set breakpoint, but:
I do not see the current line/cursor
there is no call stack displayed
there are no variables in Autos
in my Breakpoints list I see my breakpoint highlighted/bold (which means the debug is on the correct line)
Anyone ?
hope I have been somewhat clear...
Try the Visual Studio command "Debug.ShowNextStatement" (default Alt+Num*)
This can happen if the file you've loaded into the debugger isn't exactly the same version that was compiled.