420

When a compile fails in VB.NET in Visual Studio 2008, an Error List pops up at the bottom of the screen. To jump to an error, I double click on an error in the error list.

Is there a shortcut to automatically jump to the next error in the list? It gets a little bit tedious at times having to reach down and double click a list that I like to keep collapsed.

Brian Webster
  • 30,033
  • 48
  • 152
  • 225

4 Answers4

555

F8 (and Shift+F8 to go backwards).

Or at least that's what it is in my keyboard profile - you can go to tools\options\environment\keyboard and check out Edit.GoToNextLocation.

Note If you configured Visual Studio using VB keyboard settings, no key has been assigned to this function. You need to pick your own and assign them.

Carlos Muñoz
  • 17,397
  • 7
  • 55
  • 80
Brian
  • 117,631
  • 17
  • 236
  • 300
  • 7
    If you configured Visual Studio using VB keyboard settings, no key has been assigned to this function. You need to pick your own and assign them. – Bill Nov 09 '09 at 13:01
  • Works with C++ projects, too. – ahans Apr 18 '13 at 14:18
  • 14
    If luckily you don't have errors F8 goes to next warning. – Tomasito Mar 05 '14 at 13:16
  • 2
    so messed up. was happy to find that it was assigned to F4 in my config. but F4 is set to swit chthe current display on my laptop. so much to deal with... thanks though. solution (CTRL+SHIFT+F12) below worked. – victor n. Sep 30 '17 at 01:22
  • 3
    Important: at least for VS 2017, I needed to in my "error view" have selected both "Build + Intellisense" in order for these shortcuts to work. – Johan S Feb 22 '18 at 10:23
  • 1
    You can restrict this to errors in the current document or project using the drop-down in the Error List (defaults to whole solution). – Elliott Beach Aug 05 '18 at 19:11
  • 4
    Just in case if it wasnt clear, `F8` jumps to next item (be it errors, search results, symbol reference search etc). It depends on which pane had your focus last. – nawfal Feb 07 '20 at 10:05
203

Funny because I use CTRL+SHIFT+F12 which is View.NextError.

I wonder what's the difference between View.NextError and Edit.GoToNextLocation.

Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
Luis Filipe
  • 8,488
  • 7
  • 48
  • 76
  • 16
    Edit.GoToNextLocation works also when you navigate through search in files results – GôTô Aug 24 '12 at 10:46
  • 10
    When dealing with multiple projects I find `View.NextError` much more useful. This way I don't navigate to errors in other projects. – Joel Aug 06 '13 at 12:19
  • 4
    One diff between View.NextError and Edit.GoToNextLocation is that View.NextError is specific to the error list, but Edit.GoToNextLocation is applicable to error list, search results, find all refs etc – haku Jul 18 '17 at 14:25
  • definitely more useful. and beside F8 above is just decreasing my screen brightness. – victor n. Sep 30 '17 at 01:17
  • 3
    @victorn.you might have `Fn` keys active. Try to press `Fn`+`F8` – Luis Filipe Oct 02 '17 at 07:47
  • Works in VS2019. – JWP Mar 30 '20 at 21:29
  • Warning: On ubuntu this toggles composite mode which turns your screen black. Press ctrl-alt-f1 to get your screen back. – Shmuel Kamensky Jan 28 '23 at 14:56
22

If you have ReSharper installed, you can use ReSharper.ReSharper_GotoNextErrorInSolution, the default mapping for which is Shift+Alt+PgDn. This is the equivalent of clicking on the error icon shown in the bottom right of Visual Studio's status bar:

ReSharper solution errors screenshot

Simon MᶜKenzie
  • 8,344
  • 13
  • 50
  • 77
  • 4
    Useful; thanks. Seems that `Alt`+`PgDn` does the same thing, but for Warnings. – CJBS Apr 13 '17 at 17:42
  • 1
    Better than the default VS shortcut which seem to also always include warnings, so here you can pick if you want to include warnings or not which is nice. – jeromej May 26 '20 at 13:16
  • 1
    Additionally, without `ReSharper` in my instance of Visual Studio using Visual Basic 6 mapping, it appears the same keyboard shortcut was also in place by default. – k1dfr0std Jul 16 '22 at 08:11
3

For Visual Studio CODE (2022)

  1. Open Preferences: Open Keyboard Shortcuts enter image description here

  2. Find go to problem in files enter image description here

  3. Set the shortcut keys with your taste. (Default value is F8, Shift+F8.)

wantyouring
  • 187
  • 2
  • 13