Lens 0.1.2
Capture and view debugging information. This app will run and allow you to send it values to log and inspect. Since this runs as a separate process, you can still inspect log values even in the event of your program crashing.
Supports all data types and includes the ability to inspect table values.
Usage
To use, include "libs/lens.lua"
from the cart, and call Lens.log()
.
Otherwise just send a "log"
event to the lens
process:
send_message(lens_pid, { event = "log", value = "log output", }) |
This is an early release to collect feedback, so please let me know if you find it useful or any issues you encounter.
Hey, this looks so cool!
Unfortunately it's crashing for me:
This works:
include("libs/lens.lua")
Lens.log("test")
But when I hit escape to go back to the desktop (to see Lens), I get this error:
.../lens.p64.png/main.lua:339: attempt to concatenate a nil value (field 'line')
The same happens with a windowed app
But this doesn't happen if I use send_message instead
EDIT: I redownloaded it and now it's working! Awesome work :D
Oh bless you. I haven't tried it yet, but just knowing someone is even working on something like this is cause for joy.
I'll check it out and get back to you with any feedback tonight.
Thanks in advance for your work!
EDIT: I couldn't wait til tonight ... I had to go try it out ... and it WORKS! Yeah!! Sweet! Nicely done.
> But when I hit escape to go back to the desktop (to see Lens), I get this error:
.../lens.p64.png/main.lua:339: attempt to concatenate a nil value (field 'line')
Ok I've guarded against this in 0.1.2
. I can't reproduce currently but it shouldn't crash.
This is to do with the trace that the client generates from debug.traceback()
. You can provide your own traceback as well:
send_message(lens_pid, { event = "log", value = "log output", trace = {{line=99, file="myfile.lua"}} }) |
[Please log in to post a comment]