Debugging event scripts
In this recipe, we explore the options available for troubleshooting and debugging event scripts. Because event scripts are, by their nature, triggered by network, or device-related events rather than human interaction, the ordinary interactive methods for troubleshooting software complexity and bugs are left wanting. In order to optimize the code/run/debug cycle for event scripts, we outline some useful techniques here to help.
Getting ready
In order to complete this recipe, you should have access to the JUNOS router or device. You don't need an actual event script to debug. We'll just walk through the techniques with some examples.
How to do it…
Take a structured approach to event script debugging. Don't let the disassociation between the execution of the code and the actions of the user frustrate you. Work through these check items step-by-step to help find where your code is diverging from expected behavior and why. Apply patience.
- First of all, start with the event...