How to see lua scripts errors in MissionPlanner

A bit struggling with lua scripts.

per documentation, problems will be shown in MP messages, however the only message is “no lua scripts to run” which I guess AP failed to run my script because it had some errors?

Any idea how to see those errors?
(I have set scr_debug to 6)

often it will have printed the errors on boot so you need to be fast on the re-connect. If you see the baro message you got there in time.

1 Like

Thank you @iampete.

I am running on windows, is there any way to send the messages output or mp output to a file? , on my machine it is simply too fast

It should still be possible, you can always delay the start up of the script. return update(), 5000 at the bottom of the file for example gives you 5 seconds. This only works if you have no syntax errors preventing the script from loading at all. Other things that can prevent it from loading at all are a too low SCR_HEAP_SIZE.

1 Like

Thank you so much @iampete, much obliged.