Borrar filtros
Borrar filtros

green arrow for current line and variable values not displaying during debug pause at breakpoint

23 visualizaciones (últimos 30 días)
When debug breakpoint pauses my code it does not display the green arrow (on the left next to lthe line number) showing where in the code the script is paused.
Also it does not display the variable vaules when you hover the mouse over.
See the screen shot of a pause at a break point during debugging

Respuesta aceptada

Kris
Kris el 21 de Sept. de 2023
I managed to get the Debug arrow back.
I moved the scripts from a network folder to a folder on the computer hard drive debug arrow came back.
MATLAB must have some sort of bug when dealing with network folders.
  2 comentarios
Image Analyst
Image Analyst el 21 de Sept. de 2023
Is it reproducible? Did the network drive have a local drive letter mapped to it, or were you using the full UNC path starting with doubel backslash?
Walter Roberson
Walter Roberson el 21 de Sept. de 2023
I guess I could see that happening with network drives in some cases... but in such a case, I would have expected quitting MATLAB and restarting to have fixed the problem (at least temporarily)

Iniciar sesión para comentar.

Más respuestas (2)

Walter Roberson
Walter Roberson el 20 de Sept. de 2023
The highlight might not align properly if you edit the file during debugging.
  2 comentarios
Kris
Kris el 20 de Sept. de 2023
The highlight only displays the line the curser is on. It does not change with dubug pauses.
I am trying to get the green arrow on the left (next to the line number) that displays the line of code to be executed next.
Walter Roberson
Walter Roberson el 21 de Sept. de 2023
The only circumstances under which the green "current line" highlight can point to a line that has no code in it are:
  • if you paused in the debugger and that line originally had code on it but you editted the file since you started running it, so that the line numbers known to the executing code are different than the line numbers that are in the file
  • if you were executing the function by way of a function handle, and you editted the function through an external editor and MATLAB did not notice that it was modified
  • if you were executing the function by way of a function handle, and you modified the function by way of code, and you did not "clear" the function before you executed the handle again
  • (there could potentially be bugs that I have not heard of)
There is an additional situation under which the debugger could end up pointed at the "wrong" line -- but would not end up pointing to an empty line. The circumstance is that you happened to use one of the coding patterns that MATLAB was able to convert into a call to a high performance external routine. In such a case, what is being executed internally is not going to be match the code and the debugger information would be set to the last executable phrase of the replaced section -- typically an "end" statement.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 21 de Sept. de 2023
Editada: Image Analyst el 21 de Sept. de 2023
So it stopped on line 68 but there is no green arrow pointing to that line? It could be some kind of display adapter issue. What operating system are you using?
You have a 2 year old version. Can you upgrade to r2023b?
You should not have the parentheses on the for line on line 68.
You do not need the ==1 on line 71 since is_data_file is already a boolean.
Don't use i as the for loop iteration since i is the imaginary constant.
  3 comentarios
Kris
Kris el 21 de Sept. de 2023
I worked it out. I moved the scripts from a network folder to a folder on the computer hard drive. and it stopped happening. MATLAB must have ssome sort of bug when dealing with network folders.

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by