-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add $inspect.trace rune #14290
Conversation
🦋 Changeset detectedLatest commit: ae3d8a1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP
preview: https://svelte-dev-git-preview-svelte-14290-svelte.vercel.app/ this is an automated message |
I agree, I've changed it so it has to be in a function. I didn't want to limit it to be the first entry as that can cause issues inside class constructors etc.
It literally used to do exactly this, but I found it was just not useful at all. You mostly put it in effects, so it would just log
Odd, it works for me locally, but not on the REPL?! |
Can you elaborate? It should be fine as long as you're not using |
They can't even use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I was hacked..
Closes #14265. This adds the
$inspect.trace
rune to Svelte which logs the reactive graph of the current reactive context. It must be placed in a block statement and requires a string passed as an argument which is the trace name.