ipelets icon indicating copy to clipboard operation
ipelets copied to clipboard

Debugging Ipelets

Open Hirse opened this issue 7 years ago • 5 comments

I am fairly new to both Lua and Ipe. For a course project, I would like to write my own Ipelet (in Lua). I have found the manual and documentation describing how to write one and have been able to add my own simple Ipelet. As I begin to add more complex logic, it would be helpful to have a way to debug my code however. Is there any guide on how to practically develop Lua Ipelets?

Hirse avatar Feb 26 '18 23:02 Hirse

I simply use the Lua print statement. When I start Ipe from the command line, the output appears on stdout.

otfried avatar Feb 27 '18 00:02 otfried

For guidance on writing Ipelets, you may have more luck asking on the ipe-discuss mailing list.

otfried avatar Feb 27 '18 00:02 otfried

Thank you. Does this also work when running the compiled version? I am currently using the Windows binary to skip the effort of building myself. Launching from the command line only opens Ipe, but doesn't keep stdout.

Hirse avatar Feb 27 '18 00:02 Hirse

I do all my development on Linux...

It seems running ipe.exe from cmd will not give you any terminal output. However, running it from Bash (in the official Windows Subsystem for Linux of Window 10) works.

I guess I should provide an ipeDebug command for the Lua layer that will send output through the Ipe debug output system.

otfried avatar Feb 27 '18 01:02 otfried

That would be great. Thank you for the advice.

Hirse avatar Feb 27 '18 01:02 Hirse