From a4b9f9e844423bb0f2567e77349b4db2b250e4a2 Mon Sep 17 00:00:00 2001
From: "svelte-docs-bot[bot]"
<196124396+svelte-docs-bot[bot]@users.noreply.github.com>
Date: Wed, 22 Oct 2025 10:05:41 +0000
Subject: [PATCH] sync svelte docs
---
.../content/docs/svelte/02-runes/07-$inspect.md | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/apps/svelte.dev/content/docs/svelte/02-runes/07-$inspect.md b/apps/svelte.dev/content/docs/svelte/02-runes/07-$inspect.md
index aa7c6ea448..0da4982aad 100644
--- a/apps/svelte.dev/content/docs/svelte/02-runes/07-$inspect.md
+++ b/apps/svelte.dev/content/docs/svelte/02-runes/07-$inspect.md
@@ -19,6 +19,8 @@ The `$inspect` rune is roughly equivalent to `console.log`, with the exception t
```
+On updates, a stack trace will be printed, making it easy to find the origin of a state change (unless you're in the playground, due to technical limitations).
+
## $inspect(...).with
`$inspect` returns a property `with`, which you can invoke with a callback, which will then be invoked instead of `console.log`. The first argument to the callback is either `"init"` or `"update"`; subsequent arguments are the values passed to `$inspect` ([demo](/playground/untitled#H4sIAAAAAAAACkVQ24qDMBD9lSEUqlTqPlsj7ON-w7pQG8c2VCchmVSK-O-bKMs-DefKYRYx6BG9qL4XQd2EohKf1opC8Nsm4F84MkbsTXAqMbVXTltuWmp5RAZlAjFIOHjuGLOP_BKVqB00eYuKs82Qn2fNjyxLtcWeyUE2sCRry3qATQIpJRyD7WPVMf9TW-7xFu53dBcoSzAOrsqQNyOe2XUKr0Xi5kcMvdDB2wSYO-I9vKazplV1-T-d6ltgNgSG1KjVUy7ZtmdbdjqtzRcphxMS1-XubOITJtPrQWMvKnYB15_1F7KKadA_AQAA)):
@@ -37,13 +39,6 @@ The `$inspect` rune is roughly equivalent to `console.log`, with the exception t
```
-A convenient way to find the origin of some change is to pass `console.trace` to `with`:
-
-```js
-// @errors: 2304
-$inspect(stuff).with(console.trace);
-```
-
## $inspect.trace(...)
This rune, added in 5.14, causes the surrounding function to be _traced_ in development. Any time the function re-runs as part of an [effect]($effect) or a [derived]($derived), information will be printed to the console about which pieces of reactive state caused the effect to fire.