Skip to content

[Feature]: Svelte 5 $inspect rune support. #251

Closed
@alex-knyaz

Description

@alex-knyaz

What happened?

Svelte 3 & 4 had $: console.log(...) thing that worked wonders, svelte 5 removes $: syntax, and replaces $: console.log(...) with $inspect(...), with does not work with console ninja.

Version

all versions

Steps to reproduce (or sample repo)

  1. use svelte 5 starter project template.
  2. add $inspect(...) to any $state variable.
  3. run project & change state.
  4. no inline output in vscode at $inspect(...) line.

When implementing support for this, be careful of how to handle '.with' feature:
$inspect(x); // default console.log
$inspect(x).with(console.trace);
$inspect(x, y).with(() => { debugger; });

Log output

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions