Skip to content

Debugging and testing

Ralf Kilian edited this page Jan 6, 2020 · 2 revisions

Debugging and testing

Functions from the Salomon core modules can be changed, enhanced or replaced without editing them. This is quite useful for debugging and testing purposes.

Using the debug feature

In order to do this, simply create a sub-directory called debug inside the main Salomon directory (where salomon.sh is located):

mkdir debug

Next, copy an existing core script from core to debug, for example:

cp core/output.sh debug/

Now, you can change the script file inside the debug sub-directory as you desire. When starting the main Salomon script again, it will first load all script files from the core and then the scripts from the debug sub-directory, which will overwrite the functions from core/output.sh with those from debug/output.sh.

Disabling the debug feature

To make Salomon ignore the files inside the debug sub-directory, you can either remove its content or simply rename it, which is the recommended way. For example:

mv debug _debug