Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 727
WhiskerBiscuit Avatar asked Sep 03 '15 20:09

WhiskerBiscuit


1 Answers

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.

like image 181
Sudsy Avatar answered Nov 14 '22 04:11

Sudsy