dbstop doesn't stop if the line at which is supposed to stop is something like `'else'
Show older comments
If you save the code below to, say, mwe.m then at the command prompt type
dbstop in mwe at 4
then call the function, it will ignore the `else` line at which it is asked to stop, and continue on to the end. Is there a way to fix this problem, and make it stop at line 5 rather than 4?
function mwe
if 1 < 2;
disp('true');
else
disp('false');
end
disp('should not get to here');
Accepted Answer
More Answers (0)
Categories
Find more on Debugging and Improving Code in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!