Debugger quits working in App Designer right after StartupFcn completes.

46 次查看(过去 30 天)
After a week of struggling with the Serial callback not working I undated to Update 8 of 2023b and that finally resolved. (I think)
MATLAB Version: 23.2.0.2599560 (R2023b) Update 8
Now (and before too but I had other problem to deal with) my program runs with AppDesigner but the debugger stops after StartupFcn completes. I can step to here:
% Construct app
function app = MouseOdor4
runningApp = getRunningApp(app);
"blah blah blah
if nargout == 0
clear app
end
end % last line where debugger is still running
The next step the debugger stops (my app is still running) and the editor pops up this with cursor as classdef but no marker for what line we are on.
classdef AppManagementService < handle
% APPMANAGEMENTSERVICE Singleton object to manage running apps
Any clues anyone? I'd like to get this project done!
  3 个评论
Harsh
Harsh 2024-7-29,4:26
Hi @Alessandro Livi, is this function being called in the startup function or being used as a callback by any UI component?
Divyam
Divyam 2024-8-6,9:02
Hi @Alessandro Livi, share your StartupFcn and ML App. Are you using 'dbstop'/ 'uiwait' functions or referring to any other class in the code as using them might be causing your debugger to pause.

请先登录,再进行评论。

回答(1 个)

Divyam
Divyam 2024-8-8,6:25
Hi @Alessandro Livi, upon reaching the end of the callback function 'MouseOdor4' the debugger is out of the App Designer debug call stack. Since the app is no longer being debugged, your debug buttons will disappear from the App Designer.
The 'AppManagementService' code is the internal code upon which the App Designer is built on. During further execution, the debugger steps through the internal app designer code just like any debugger for an interpretted language. To skip/quit reviewing the internal files, either utilize the debugging controls in the MATLAB editor or use the Command Window commands like 'dbquit'. For more information on how to use 'dbquit', you can refer the following documentation: https://www.mathworks.com/help/matlab/ref/dbquit.html
In the 'runApp' function the debugger could stop due to two cases:
  1. The "evalin" function has stepped through an infinite loop. To resolve this issue, check the expression which the function is executing.
  2. The debugger has moved to evaluate the command in the "appFullFileName" file and the control for the debugger has been passed to the MATLAB editor. The debug controls of MATLAB Editor can be used to control the debugger in this case.

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by