Breakpoints are ignored when running a GUI

5 views (last 30 days)
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 Comments
Henrik Enquist
Henrik Enquist on 29 Jan 2020
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 on 29 Jan 2020
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.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 29 Jan 2020
Edited: Image Analyst on 29 Jan 2020
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 Comments
Henrik Enquist
Henrik Enquist on 29 Jan 2020
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 on 29 Jan 2020
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.

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!