Filter löschen
Filter löschen

Matlab doesn't stop at a breakpoint

5 Ansichten (letzte 30 Tage)
Bogdan -Ervin
Bogdan -Ervin am 10 Okt. 2023
Kommentiert: Bogdan -Ervin am 11 Okt. 2023
I have a script in a folder, and a class in another folder. (Both folders are in Matlab path.) In the script is created an instance of the class and a method (of the instance) is called. Matlab doesn't stop at the valid breakpoint placed in the method (the breakpoint is a red circle and the line doesn't have any error). I have even tried to set the breakpoint with dbstop, but the code still doesn't stop at the breakpoint.
Why is this happening and any tip for solving it?

Antworten (1)

Steven Lord
Steven Lord am 10 Okt. 2023
Without seeing the code we can only guess, but is the breakpoint inside an if statement? If so, are you certain the condition of the if statement is satisfied?
Try setting a breakpoint on the very first line of the method and step through the code to confirm that you are correct that the condition is satisfied.
  1 Kommentar
Bogdan -Ervin
Bogdan -Ervin am 11 Okt. 2023
Hello!
The breakpoint is in a if statement, but the condition is satisfied (the brench is calling disp function, and the message in disp is shown in Command Window).
I can not share the code, because is confidential/ written by the company I work for.
Also the breakpoint is a standard one.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Debugging and Analysis finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by