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?
Use Ctrl + E, then Ctrl + W for disable horizontal scrolling.
To hide the horizontal scrollbar and prevent horizontal scrolling, use overflow-x: hidden: HTML. CSS.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With