Problem in Debugging matlab function
3 次查看(过去 30 天)
显示 更早的评论
I am running a MATLAB function which also has some other functions in it. When I start debugging this, I can step into the other function that is present in it. After stepping into the other function, I want to debug this function. But I have a very big loop (say 50 iterations ) present in it. Can I come out of that loop with out going through those 50 iterations ? ( Can I directly come out of that loop and continue with the remaining lines of the code ?). I also see that conditional break point does not work after steeping into this function.
0 个评论
回答(2 个)
KSSV
2016-9-2
Why don't you put debug option/ break point after the loop. As you have already debugged it till the loop.
Stephen23
2016-9-2
编辑:Stephen23
2016-9-2
This really is very simple:
- Place another breakpoint just after the loop.
- When the debugger reaches the loop, run dbcont or click the Continue button.
This works because within debug mode, the dbcont will run all the code until the next breakpoint. So you can simply put a breakpoint after the loop, run the "continue" command and the code will run up to the breakpoint after the loop.
3 个评论
Stephen23
2016-9-12
@PISKA RAGHU: I am glad that it is working. Please accept my answer if it resolved your problem.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!