Debug /pause at every function definition line (local function or function script) without explicit breakpoints

3 次查看(过去 30 天)
Dear All,
I am trying to debug a GUI associated with a (new to me) code package, containing m scripts with multiple local functions/subfunctions, and also function scripts. During certain GUI operations, the code executions hops from one function to another. Is there a way to pause in debug mode at the function definition line of any function/subfunction within a particular script, or when hopping to another function script, without declaring any breakpoints beforehead (since I do not know which scripts/functions the GUI uses a priori)?
Thank you,
OL

采纳的回答

Steven Lord
Steven Lord 2020-3-18
There's no way to say "stop whenever a new function gets called" in debug mode without setting breakpoints.
But if you're debugging your code you can "Step In" to the function that gets called on a particular line. You can also "Run to Cursor" to move your cursor to a particular line and automatically execute up to that point. See the "Step Through File" section on this documentation page for more information.
  2 个评论
Octavian
Octavian 2020-3-19
Thank you Steven. A gross method to see where the code takes one is to find a downstream snippet that is confirmed processed, then introduce an error, the errorlog would show the path to error. Would be nice to have smth forward though.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interface-Based Instrument Communication 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by