Question

Photo of James Temens

0

Debugging Lava

What is the best way to debug Lava?  I saw in the documentation for Lava something about Debug block settings but, I can't find any details on it and I'm curious to know if there are any additional ways to debug it.


For example, I want to show the cell phone number of the parent on the check-in label.  To  make sure it works is the only way to print out a label and see if the Lava code worked or can I run it and debug it somewhere else first?

  • Photo of Morgan Woods-Leshe

    0

    You can go to the Rock shop and download the Lava Tester for free to test lava. 

    I also recently learned that you can use this lava filter in blocks to enable debug: {{ 'Lava' | Debug }}

  • Photo of Jim Michael

    0

    Jut to add on to Morgan's good answer... prior to Rock v7 every block needed "debug" functionality to be coded into it, and it was just a checkbox you selected when editing the block, but it was difficult to maintain code-wise. So in v7 they removed that from almost every block, and instead added the Debug Lava *filter*, which lets you (as Morgan says) add `| Debug` to just about any Lava tag and it will then spit out the debug info. So that's why there might be confusion from some old posts/docs around here... there *used* to be a debug "function", but now it's a *filter*