21.4 Debugging

How to identify the source of a problem.

21.4.1 Using tests/workflow.R

This script, along with model-specific settings files in the tests folder, provide a working example. From inside the tests folder, R CMD --vanilla -- --settings pecan.<model>.xml < workflow.R should work.

The next step is to add debugonce(<broken.function.name>) before running the test workflow.

This allows you can step through the function and evaluate the different objects as they are created and/or transformed.

See tests README for more information.