Gravatar for

Question by Dennis Augustine, Jan 22, 2019 12:45 AM

Debugging Hive Script Result Templates

I'm trying to determine why the script in a Hive Result Item Template isn't working well. With the legacy framework I'd get some output in the console with Chrome Dev Tools. With my current HIV results page I'm getting nothing. Can I enable script debugging? How?

1 Reply
Gravatar for

Answer by Jean-François L'Heureux, Jan 22, 2019 3:33 PM

I do not think you can break in the script generated by an UnderscoreJS template. The easiest way for you would be to insert a `debugger;` statement as the first statement in your result template code. In UnderscoreJS, this can be done like this:

{{ debugger; }}
<% debugger; %>

Or you could add `console.log()` statements in your result template as well.

Gravatar for

Comment by Dennis Augustine, Jan 22, 2019 4:26 PM

Thanks JF. I'll give that a go.

Ask a question