Going to previous step while debugging

55 vues (au cours des 30 derniers jours)
Lalan
Lalan le 12 Mai 2015
Commenté : Morgan le 4 Mai 2023
Hi
How to go to previous step while debugging in matlab just like we use F10 for next step? Is there any such option?
Thanks - Lalan
  1 commentaire
Morgan
Morgan le 4 Mai 2023
Fellowship PS is crucial in showcasing our passion for a particular field. With the help of our professor and fellow classmates, I was able to create compelling fellowship personal statements that truly reflects my motivation for pursuing this fellowship.

Connectez-vous pour commenter.

Réponse acceptée

Guillaume
Guillaume le 12 Mai 2015
You would think it would be something easy to implement in a interpreted language, but unfortunately, it's not possible to move the execution pointer to an arbitrary line in matlab.
You can only step forward I'm afraid.
  5 commentaires
Guillaume
Guillaume le 13 Mai 2015
Actually, what I really miss is the ability to skip (as in not execute) a line.
I just came across this today debugging some code, arrived on a line which contained a typo (wrong variable name). I could just have typed the correct instruction in the command window and skipped to the next line instead of restarting the debugging from scratch.
It's the same concept though: give the user the ability to move the execution pointer around.
Image Analyst
Image Analyst le 24 Mai 2015
This capability is called "edit and continue". I love it in Visual Studio and am frustrated it's not there in MATLAB. I use Walter's method of doing/undoing stuff in the command window while at a breakpoint.

Connectez-vous pour commenter.

Plus de réponses (1)

Robbin van Hoek
Robbin van Hoek le 12 Mai 2015
Not sure if it will help you since i don't know why you need to go back, but have a look at conditional breakpoints. This helped me a lot in the cases where i wanted to go back one step in debugging.
  1 commentaire
Lalan
Lalan le 24 Juin 2015
Thanks Hoek for the answer. I felt this necessity here. While debugging a program, I accidentally crossed a function where I needed to go inside that function. So I wanted to come back to previous step and step into that function.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by