Breakpoints are ignored when running a GUI

5 次查看(过去 30 天)
Breakpoints are ignored when running a GUI created using GUIDE.
The breakpoints are not cleared i.e. still visible/acitve in the Editor.
There are no 'clear all' commands in the code.
Breakpoints are respected when running the code in the Editor window.
I have tried restarting MatLab and rebooting the computer.
Please advice.
  18 个评论
Henrik Enquist
Henrik Enquist 2020-1-29
Geoff,
all breakpoints, regardless of location, are ignored.
Allen,
good point and something to be watchful of, but sadly not the case for me.
Adam
Adam 2020-1-29
Have you tried resetting your path to the minimum of just Matlab toolboxes plus what you need for your GUI (although it if fails on every GUI you could try with only Matlab stuff on the path and create a basic GUI to test). I don't know what function it is that is triggered internally to hit a breakpoint, but maybe you have some 3rd party code on your path that is over-riding that function? Would be a bit surprising though if that were the case.

请先登录,再进行评论。

回答(1 个)

Image Analyst
Image Analyst 2020-1-29
编辑:Image Analyst 2020-1-29
I do remember seeing that several versions ago but only for the situation where the breakpoints were in a sub-GUI created by GUIDE. It would stop at locations in the main GUI but not in the sub-GUI. However it seems like they fixed that problem with more recent versions. Do you have your breakpoints in code in a separate .m file (& .fig file) that gets called by the main GUI?
  2 个评论
Henrik Enquist
Henrik Enquist 2020-1-29
As a matter of fact, I use a sub-GUI in this case. However, I have set breakpoints in both the main-GUI .m file, in the sub-GUI file, and in other files containing called functions. All breakpoints are ignored/skipped but still present and active in the editor.
Image Analyst
Image Analyst 2020-1-29
Yes, that was almost my situation. It would stop at the breakpoints in the main gui but not the sub-gui. But I don't see that anymore so I think they fixed it 2 or 3 years ago and you should not see it in your release. When you run the program, are all files saved (no asterisk after the name on the editor tab)? They must be saved so make sure there are no asterisks. So, assuming that doesn't fix it, call them. I just called them last week about GUIDE not allowing me to have a callback with a pulldown menu item and they told me it was a known bug that will be fixed in Update 4, accessible from the Add Ons button on the tool ribbon, but it's not out yet, as of Jan 25, 2020. So maybe your issue is a known bug, though I can't reproduce it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by