Does anyone know of a debugger for Lua scripts.
I only ask because I sent a lot of time on my first script, it would be nice to see the values I'm getting while running it.
It is currently October 13th, 2024, 7:47 am
Lua debugger
-
- Posts: 858
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Lua debugger
Last edited by CyberTheWorm on January 7th, 2018, 4:58 am, edited 1 time in total.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Developer
- Posts: 22851
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Lua debugger
There really isn't anything I know of that is some kind of official debugger, but there is good news. The print() function outputs to the Rainmeter log, so you can just:CyberTheWorm wrote:Does anyone know of a debugger for Lua scripts.
I only ask because I sent a lot of time on my first script, it would be nice to see the values I'm getting while running it.
for inc = 1, 5 do
print(inc)
end
Point is, you can output any result, any variable or table value to the Rainmeter log pretty easily. Just remember that the log will be in reverse chronological order...
What you would see in the log with the above is:
5
4
3
2
1
You could certainly write a function that outputs to a text file, and call it with LogMe('The current value of someVar is '..SomeVar), but I have never run into something that required that much effort. The print() function does a good job of telling you what it going on.
-
- Posts: 858
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Lua debugger
OK Thanks jsmorley
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 2
- Joined: April 26th, 2018, 2:29 pm