How to check the current line (debug)

15 visualizaciones (últimos 30 días)
Mateusz
Mateusz el 10 de Abr. de 2012
Respondida: Pruthvi G el 20 de Mzo. de 2019
I often use 'keyboard' command to debug my programs (since sometimes I have to use command line and matlab -nodisplay setup). When the keyboard command is reached, the execution is stopped until I type return or dbquit. Sometimes, however, I would also like to know where the execution has been stopped, that is which function/script, which line. This might help me to trace down all keyboard instructions that I have put and that are reached during the execution. It this possible in Matlab R2011b?

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 10 de Abr. de 2012
Perhaps dbstack()?
doc dbstack
  1 comentario
Mateusz
Mateusz el 10 de Abr. de 2012
Looks this is what I need, thanks!

Iniciar sesión para comentar.

Más respuestas (1)

Pruthvi G
Pruthvi G el 20 de Mzo. de 2019

Categorías

Más información sobre Desktop en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by