Can I avoid autoscroll while steping in debug mode?
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Piyush
2023-10-10
编辑:Piyush
2023-10-10
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!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!