
ctrl+k
Enter a search term above to see results...
Enter a search term above to see results...
Debug helpers provide utilities for troubleshooting and debugging in templates.
Logs arguments to the console.
{log 'Debug message' (object data=someValue)}
Name | Type | Description |
---|---|---|
args | …any | The values to log |
undefined
<div> {log 'Current user state:' (object name=userName age=userAge)} <h2>{userName}</h2> <p>Age: {userAge}</p></div>
Triggers the JavaScript debugger, allowing you to inspect the current state of your application.
{debugger}
None
undefined
<div> Current count: {count} {debugger} <button onclick="{increment}">Increment</button></div>
Debugs reactivity by logging the current reaction source and triggering the debugger. This is particularly useful for understanding which reactive dependencies triggered a re-computation.
{debugReactivity}
None
undefined
<div> <p>Total: {total}</p> {debugReactivity} <p>Items: {items.length}</p></div>
Note: The
debugReactivity
helper is specific to the reactivity system and provides detailed information about the current reactive computation. It can be helpful in tracking down unexpected re-renders or understanding the flow of reactivity in your application.