Why does a program that is getting debugged in Visual Studio take focus and not allow me to alt-tab back to VS? - c++

I am trying to debug an application and look at the code while a test runs, but while that test is running the focus is forced on only the application. I can't alt-tab from it back to Visual Studio, because it forces back the focus. How can I look at the code and allow a test to run without it taking focus? This is in C++ and this is not an instance where a breakpoint is being hit

Related

How to put out a Dos screen once you build in Visual studio?

I'm pretty new to programming and I have built my program a few times. However I can't figure out how to make a Command Window or DOS window show up, even after the build has finished in Visual Studio on Windows.
Suppose you have built your program as a 'Console app' or 'Command-Line app' in Visual Studio. These were choices you made when you first set up your project. Then, running your program from Visual Studio will cause a Command Window (DOS like) to display, and your program will start within this window.
The 'Debug' menu item has 'Start Debugging' and 'Start Without Debugging' - either choice will run your program.
Depending on your version of Visual Studio or your configuration options, Visual Studio may close the console window as soon as the program completes. This is not the default behavior on recent Visual Studio options, but you may miss the Console Window popping up and going away if it is happening to you. Likewise, it may be hidden if the Console Window is not displayed as the top-most Window.

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

Multi Device Hybrid App in Visual Studio 2013 Does Not Refresh / Crashes

I have created a multi device hybrid project in Visual Studio 2013.
I am having a few major issues:
1) Changes to my scripts do not appear unless I completely rebuild the application when I am using Ripple to view the project.
2) Pressing F12 in the Chrome ripple window causes Visual Studio to stop running the application. This seems very strange. It's like if I were to quit debugging on a normal webapp.
Output shows The program '[1] http://localhost:4400/index.html?enableripple=cordova-3.0.0-NexusGalaxy: WebKit' has exited with code -1 (0xffffffff).
Has anyone had these problems or know what might be causing them?
Both of the behaviors you describe are expected. Ripple is not automatically refreshed when you save your changes so you will need to rebuild and deploy for it to pick up the updates. Since only one process can use the webkit debugging at once, the VS debugging session gets disconnected when you use the debugging tools in Chrome.

Visual Studio 2013: native C++ single-step debugging (F10) slow

I am using Visual Studio Premium 2013 Update 2 on a freshly installed (fast) machine with Windows 8.1 Update. Everything is running smoothly, only one thing bugs me:
Problem
When I debug a native C++ project (debug build) by going from line to line with F10 ("step over") it takes 1-2 seconds to go to the next line when I press the F10 key.
What I tried
I looked at several other questions related to slow debugging and made sure that neither of the following is not the reason in my case:
Everything is local (app and all data), no network shares involved
Disabling the Microsoft symbol server did not help
I only have a single breakpoint
Using the menu/toolbar instead of the keyboard does not make any difference
In the default configuration "edit and continue" is enabled, but apparently not for native code:
When I disabled "edit and continue" completely, F10 stepping became much faster (0.5-1 s). The speed is tolerable now. I had to restart Visual Studio after I changed the configuration to this:

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