I have a macro that loads up some variables from a text file and wanted to check the contents of one of the variables, so I added a Debugger Start action at the end of the actions that read from the file so that I could inspect the variable. However, the debugger only displays the last ten most recently modified variables, and of course the one I was interested in was the eleventh...
I was easily able to check the variable by temporarily adding a Display Text action to view the contents of the variable, but it got me wondering if there's a hidden setting that controls the number of variables displayed in the debugger. I don't need it very often, but setting the number that are displayed in the debugger to a higher value would be helpful on occasions.
I can't see anything in the Wiki or forum about changing the number of most recently modified variables in the debugger, so:
● Is there an existing hidden setting that can increase that number?
● If there isn't such a setting, can I please request a future enhancement to add a way to increase the number of most recently modified variables that are displayed in the debugger?
I agree that it's not common to need to see more than ten variables in the debugger, I just happened to hit a case where seeing 15 or 20 would have been helpful. It was easy to workaround using a Display Text action for the specific variable I wanted to check, and if I hit a similar situation again I'll use the excellent Variable Inspector Prompt by @danthomas that lets me see all of the variables I need at once.
Have you ever tried the Value Inspector window which is activated under the Window menu of the KM Editor? In some cases, this works even better than the debugger for showing variables.
Once you activate it, if you right click inside the window, you can set the flag "Show in background" which will probably be what you want.
Hi @Airy. Yes, I'm aware of it, but I thought it only worked for global variables, and I was looking at local variables. A quick test shows the values of global variables, but I can't get it to display local ones. Do you know if it's possible to display local variables in the Value Inspector whilst the macro is running? If so, can you give me a steer on how to do it please?
I am aware it only works with globals, but when I read your post that's what I inferred that you were using.
That would be a logical impossibility, since the Value Inspector window is created by the KM Editor which has no idea which running macro you want the Local variable to be obtained from.
No worries. The value inspector window is certainly useful but in this case, as they are local variables, I'd turned to the debugger to view the recently updated variables and tripped over the limit of it displaying a maximum of 10. As usual though, there're lots of different ways of doing things in KM so a workaround was straightforward.
Another way to display Local Variables is to show them using the Display Progress Bar action. I use this action for a multitude of things, including displaying local variables.