Matlab 2021b: Run Section in debugging mode not working anymore

조회 수: 11 (최근 30일)
Michael Zauner
Michael Zauner 2021년 10월 21일
답변: Marcel 2021년 11월 10일
I have upgraded to Matlab 2021b recently and found out that changes have been made regarding to the debugger and the 'Run section' command.
Previously, you could be debugging and interactively execute sections (either via the 'Run section' button or by hitting 'Ctrl+Enter').
This functionallity is no longer in the newest release.
What happens instead is that it seems like the 'Run section' is queued and executed after the debugger is ended.
A minimum working example:
function test()
disp('this one is printed')
%% create a section
disp('we want to print this more than once by hitting ctrl+enter')
%% doesn't matter if we create a new section here or not
disp('set a breakpoint on this line')
end
  1. Set a breakpoint on the last line of the function
  2. Execute function and see the output in the command window: "this one is printed" and "we want to print this more than once by hitting ctrl+enter"
  3. While still being in the debugger, try to execute the section with the second disp more than once (you can use 'Ctrl+Enter' or the 'Run section' button)
  4. The section is not executed, and we do not get any output
  5. Exit the debugger by pressing 'Continue'
  6. Output in the command window: "set a breakpoint on this line" and "we want to print this more than once by hitting ctrl+enter"
It seems like the execution from step 3 is registered, but only done AFTER the debugger is exited!
Another question having also issues with the 'Run section' functionality can be found here (there an error occurs and the debugger is not active):
Are there any plans to return to the original behaviour?

채택된 답변

Srijith Kasaragod
Srijith Kasaragod 2021년 10월 29일
편집: Srijith Kasaragod 2021년 11월 5일
Hi Michael,
This is a known issue and our developers are aware about it. It might be fixed in future releases.
There are no workarounds for this issue at the moment.
Regards.
  댓글 수: 1
Michael Zauner
Michael Zauner 2021년 10월 29일
편집: Michael Zauner 2021년 10월 29일
Thanks for the reply! I am looking forward seeing that bug fixed.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Marcel
Marcel 2021년 11월 10일
Is it planned to fix this bug with an update-release or do we need to wait for Matlab 2022?
This is a major bug that would prevent users to use 2021b in my eye, otherwise is no efficient working possible.
Is there already a time-line when we can expect a fix?

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by