-
Notifications
You must be signed in to change notification settings - Fork 6
Debugging
A common programming tool is to remove lines of code that might be causing problems, and examine the operation of the code without them. This is highly relevant to a pipeline system like Denina.
For example:
Http.Get -url:http://example.com
Html.Extract -path:title
Html.WrapTag -tag:div
Assume that we are not getting the result we expect from this pipeline. We don't know where the problem is -- there's a chance the output of the first 1 -- an HTTP call -- might be wrong, which means every step after it could be working on invalid input. It might be helpful to walk through the pipeline step-by-step to see what each filter is doing that.
An easy way to do this is by "commenting out" steps 2 and 3, to examine the output of step 1 and determine if it's what we expect. (For more on commenting, see the very end of Commands and Arguments).
Http.Get -url:http://example.com
# Html.Extract -path:title
# Html.WrapTag -tag:div
By adding a # to the beginning of lines 2 and 3, they are no longer executed. They are considered "commentary" by the Denina engine. These leaves line 1 as the only executable step, which means its output will be the output of the entire script (remember, the last executable step in a script is the final output).
Commenting allows you to "delete without deleting." My commenting steps, you are effectively removing them from the script without deleting them, which allows you to re-add them selectively to examine the progressive refinement of the input throughout the script.
After pipeline/script execution, Denina populates a set of debugging log entries with data from every filter execution. This information can be output for debugging.
Presently, there is only one output format: Core.DumpToXml. (TODO: Add plain text and HTML formats.)
- See related issue: https://github.com/deanebarker/Denina-Sharp/issues/8
From our script above:
Http.Get -url:http://example.com
Html.Extract -path:title
Html.WrapTag -tag:div
Core.DumpToXml
The final step will simply output all the debugging information for every step of the pipeline, including input/output text for every filter, variables available during the execution of every filter, time elapsed for every filter, etc. See Debug Data for everything that is provided.
If the output is too lengthy, two arguments can make it more readable by removing some information:
- Set
-io:falseto remove the input/output data of each filter - Set
-variables:falseto remove the available variables of each filter
Confused? See Definitions.
Still confused? Email Deane or file an issue.
Denina is a weird hobby project that Blend Interactive generally tolerates.
- Introduction
- Definitions
- Denina for Editors
- Denina for Developers
- Examples and Tutorials
- Implementations
- About
- Roadmap
Filter Command Reference
(auto-generated API documentation)