Can I avoid autoscroll while steping in debug mode?

3 views (last 30 days)
When I am debugging, steping line by line, and I am reaching the bottom of the screen, Matlab scrolls down as I go down. While I can see this can be useful for some people I prefer not to have my text move. Is there a way to change this behavior?
I recently moved to Matlab 2023a.

Answers (1)

Piyush
Piyush on 10 Oct 2023
Edited: Piyush on 10 Oct 2023
I can understand that you are having issues while debugging your code because of MATLAB's inbuilt feature of autoscrolling over the breakpoints.
Please note that MATLAB currently does not support disabling the 'autoscroll' feature while debugging. However, there is workaround you can try. You can use breakpoints strategically in your code to pause the execution at specific locations. By placing breakpoints at critical points, you can control the flow of execution and manually step through the code without the need for automatic scrolling.
To set a breakpoint, simply click on the left margin of the MATLAB editor window next to the line where you want the execution to pause. A red circle will appear indicating the breakpoint. When you run your code in debug mode, MATLAB will halt at each breakpoint, allowing you to examine variables and step through the code manually using the debugging controls.
By using breakpoints effectively, you can have more control over the debugging process and keep the text stationary while examining your code.
Hope this helps!

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!