Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I prevent Visual Studio editor from automatically horizontally scrolling when a breakpoint is hit

In Visual Basic (I've seen this in 2005 and 2008) when you hit a breakpoint or single step and the code on this line stretches past the end of the screen, the window automatically scrolls right so that as much of the line is visible as possible. I can see why this might be useful, but I find it a little distracting as the screen appears to jump around a lot while I'm trying to debug. Furthermore, the context of the code can be chopped off, so if there are a few nested loops, ifs etc then the rest of the code can be entirely off-screen which is frustrating.

Does anyone know how to disable this behavior?

like image 880
Sean Avatar asked Jul 22 '10 11:07

Sean


People also ask

How do I turn off horizontal scrolling in Visual Studio?

Use Ctrl + E, then Ctrl + W for disable horizontal scrolling.

How do I turn off horizontal scrolling?

To hide the horizontal scrollbar and prevent horizontal scrolling, use overflow-x: hidden: HTML. CSS.

How do I enable horizontal scrolling in Visual Studio?

Enables horizontal scrolling by holding down the Shift key and spinning the mouse wheel in Visual Studio 2017, 2019 and 2022. This feature is available in many other programs.


1 Answers

Not an exact solution, but you can bump the lines back over by clicking the thin vertical code-folding/outlining line next to the line numbers. Slightly better than going down to the scrollbar. This is in VS 2015.

like image 119
blevotroid Avatar answered Oct 13 '22 23:10

blevotroid