Debugging Guide

Preface:


This short guide will provide an explanation of how to activate and view the debugging messages that Editra prints during its execution to help with with finding errors and getting valuable runtime information out of Editra.



Turning On Debugging


DEBUG mode can be turned on in one of two ways
  • If running Editra from the command line pass either the "-d" or "--debug" arguments when starting Editra. This will activate DEBUG mode for the current session.
    Editra -d
  • It can also be turned on in the preferences dialog by selecting DEBUG from the Mode choice box on the General page. This will set debugging to the console for the current session and all subsequent ones until the value is changed back to CODE

Viewing Output


Where the console debugging messages go to when debugging is turned on varies depending on how Editra is run, whether its a binary or source script, and what operating system its run on. Included in this section is where to find the debugging messages under the normal use cases broken into three sections based on operating system.

Editra also has a built-in log viewer that can be used to view the logging messages in a display that is shown in the Shelf. This view method can be used the same regardless of how Editra is run, but it requires the gui to be fully initialized before the messages can be displayed, which means that some messages during the early startup may be missed.

Macintosh OSX

On OSX the debugging messages can be shown in one of three different locations depending on how Editra was installed and is being run on your system.

  • Case 1: Running source scripts in DEBUG mode - All messages are sent to the terminal that launched Editra.
  • Case 2: Running a binary version of Editra - Open Console.app to see all the messages from DEBUG mode.
  • Case 3: Binary/Source version of Editra - Show=>View=>Shelf=>Editra Log for the built-in log viewer.
Linux

On Linux and other Unix like systems, Editra's debugging messages will be sent to one of two possible locations depending on mode of operation

  • Case 1: Running in DEBUG mode - All messages are sent to the terminal that launched Editra.
  • Case 2: Binary/Source version of Editra - Show=>View=>Shelf=>Editra Log for the builtin log viewer.
Windows

On Windows the debugging messages can be shown in one of two locations

  • Case 1: Running source scripts in DEBUG mode - All messages are sent to the terminal that launched Editra.
  • Case 2: Binary/Source version of Editra - Show=>View=>Shelf=>Editra Log for the builtin log viewer.


Editra Log Window

Here is what the log window looks like. Errors messages will be highlighted in red

Log Window