How to stop on a variable getting a specific value?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Evgeny Bespechansky
am 30 Apr. 2019
Kommentiert: dpb
am 1 Mai 2019
I have a variable that can change its value in multiple locations within a long function.
For debugging purposes I want to stop-in-debug once this variable gets a specific value.
I could go throughout the code and set a conditional breakpoint in each line it can happen, but I wonder, if there is a way to set a "global" conditional breakpoint?
0 Kommentare
Akzeptierte Antwort
dpb
am 30 Apr. 2019
Bearbeitet: dpb
am 30 Apr. 2019
dbstop in file at if expression
is best you can do I think...you don't have to manually insert the breakpoint at every line but would have to get the line numbers and put into a little script to run...a little grep utility could possibly be invoked to build/retrieve the lines in the m-file with an assignment to the subject variable name???
ADDENDUM:
I've long thought the debugger should have a watch facility besides...
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!