Make debugger variable watch smarter

Mousing over the expression “coordMove[3]” should show me the 3rd character of the string instead of the entire string.

Even cooler would be show me the entire string and also the 3rd character, and any other variable involved in the expression I’d like to evaluate.

Here I’m trying to debug a case where probably I’m using two different ASCII characters that look like “-”, so showing both the ASCII and the raw byte interpretation of the variable like Visual Studio does would save me some time.

I have a gigantic monitor, it’s ok to use more than .01% of it to give me debug info.

image

6 Likes

My Watches lies about what is in scope, making this problem even more annoying to debug.

3 Likes

Even more annoying, it turns out Lua is the only language on the planet where strings can’t be indexed with [].

http://lua-users.org/wiki/StringIndexing

So I guess it would be cool if my code threw a compile or runtime error, because the expression I want the debugger to eval doesn’t even make sense unless coordMove is a table, which it isn’t.

2 Likes