Why are breakpoints invisible in Matlab editor windows?

I recently had the following curious issue with Matlab debug mode. I usually use the debugger to a large extent - usually setting breakpoints on separate lines in the editor window, as a result of which the image with the usual red circle indicates a line with a breakpoint on it.

Over the past few days, I have not been able to get these breakpoints on the visible screen. I press a line and a red circle partially appears (since I hold the mouse click) and then disappears. Note that the breakpoint is active, as checked by either dbstatus, or the code just executes. When execution is interrupted on the corresponding line and the program is paused, I have no visual confirmation that it is paused on this line (i.e., a typical arrow pointer in the editor window), except for the status message, which says that I'm in debug mode. One interesting twist is that I can see breakpoints if I have unsaved code changes, but they disappear after saving (as is usually the case), and I cannot see them until the file has unsaved changes.

There is no use of clear or transparent code in the code, but I want to emphasize once again that breakpoints are not inactive, they are simply not visible. The error is reproduced using the simplest single-line function.

+4
source share
2 answers

I experienced the same error, I can’t remember which version of MATLAB, but it is present only with the 64-bit version, and not with the x86 bit version. The latest 64-bit MATLAB versions do not have the same problem.

Another way to do this is if you have some relative paths in your path in MATLAB, and not, for example,

addpath('C:\topdir\subdir1\..\subdir2'); 

do

 addpath('C:\topdir\subdir2'); 

See this helpful post on

+2
source

I had the same problem.

I copy the contents of the function where the breakpoints were not displayed and did not go to the new function.

Delete the old function and insert a new one with the same name in the same directory.

This solves the problem. My breakpoints are now visible as before.

-1
source

Source: https://habr.com/ru/post/1341231/


All Articles