Sub-function breakpoints do not work when MATLAB debugging

Source: Internet
Author: User

MATLAB debugging code always encountered a strange problem, that is, when I in the main program (. m script) call the child function and set a breakpoint in the child function, and then start debugging run the main program ...

It is found that the main program runs directly to the end and does not stop at the breakpoint set when the child function is called, and the breakpoint set is cleared ...

However, if you set a breakpoint where the corresponding child function is called in the main program, stop at this point while debugging and then continue running, you can stop at the breakpoint in the child function ...

This problem has been bothering me for a long time, although the second method can achieve the required debugging functions, but always in the main program to stop, a little trouble

So, something to ask Google ~~you get the answer ...

The original is because in the main program in the beginning of the habit of calling clear all cleared, and this statement will set the breakpoint also clear out, so there will be that situation ~ ~

Khan ~ ~ ~, so, suddenly a kind of clairvoyant bright

So it's OK Google is still helpful ^ ^

Ref

https://www.mathworks.com/matlabcentral/newsreader/view_thread/258878

Http://stackoverflow.com/questions/23843708/matlab-setting-breakpoints-in-called-functions

Sub-function breakpoints do not work when MATLAB debugging

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.