From 51be7cf8e3d440f9195e17ab7defa789e110a911 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 15 May 2019 18:04:25 -0400 Subject: [PATCH] explain how debug tag without args fires on all state changes --- site/content/docs/02-template-syntax.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 44256b52e7..5b8a22f9bf 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -1266,7 +1266,7 @@ The `` element provides a place to specify per-component compile ### @debug ```sv -{@debug variable} +{@debug} ``` ```sv {@debug var1, var2, ..., varN} @@ -1274,7 +1274,9 @@ The `` element provides a place to specify per-component compile --- -The `{@debug ...}` tag offers an alternative to `console.log(...)`. It allows you to inspect the value of a specific variable, but additionally pauses code execution when you have devtools open. +The `{@debug ...}` tag offers an alternative to `console.log(...)`. It logs the values of specific variables whenever they change, and pauses code execution if you have devtools open. + +It accepts a comma-separated list of variable names (not arbitrary expressions). ```html