Use variables in dbstop

조회 수: 3 (최근 30일)
Mohamed AKI Ahmed
Mohamed AKI Ahmed 2021년 11월 15일
편집: Chris 2021년 11월 15일
Hello. I want to ask if I can use dbstop for a specific input defined before the function is called.
For example,
file= 'dully'
line=5
The file and line will be defind by the user, then when dbstop is called, I want the breakpoint to be put in that defined file and line, as follows
dbstop in file at line
Is there anyway to do that? Thanks

채택된 답변

Chris
Chris 2021년 11월 15일
편집: Chris 2021년 11월 15일
dbstop(file,num2str(line))
Usually, functions that have input forms like dbstop has can also be called like a normal function. I'm not sure why it's not documented--perhaps it's considered dangerous to do it this way.
  댓글 수: 1
Mohamed AKI Ahmed
Mohamed AKI Ahmed 2021년 11월 15일
Thank you very much!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by