sveltejs / svelte-devtools

A browser extension to inspect Svelte application by extending your browser devtools capabilities
https://chromewebstore.google.com/detail/svelte-devtools/kfidecgcdjjfpeckbblhmfkhmlgecoff
MIT License
1.39k stars 79 forks source link

Support for Svelte 5.0 Preview #193

Open casillasenrique opened 3 months ago

casillasenrique commented 3 months ago

Describe the bug SvelteKit app is not detected when opening up the devtools. Tried numerous reinstalls of the Chrome devtools. Is there an expected timeline on when Svelte 5 support will be added?

image

To Reproduce

  1. Create a SvelteKit app with the Svelte 5 (npm install svelte@next)
  2. Run the app locally (npm run dev)
  3. Open browser dev tools and open Svelte dev tools
  4. See error

Expected behavior Normal behavior, Svelte app should be detected

Environment

Additional context None

ignatiusmb commented 3 months ago

It's on the radar, we're trying to stabilize Svelte 5 first before we do any work on the integration

thebjorn commented 2 months ago

Would it be possible to change the readme from

This extension officially supports Svelte 4.0 and above.

to something that mentions that 5 is not supported yet..? (I'm sure that will save people some time ;-) )

ignatiusmb commented 2 months ago

Yep, updated the text in #212. Thanks!

jacob-8 commented 2 months ago

@ignatiusmb, I love your and @RedHatter's work on the devtools! I copied it to enable Kitbook's ability to build a component tree from the current view, similar to your tool, see here. Mine's a bit simpler as at the moment as it doesn't do anything for event tracking or for watching state updates. It just takes a state snapshot whenever a component is selected.

tools3

Anyhow, seeing as how Svelte 5 components no longer dispatch SvelteRegisterBlock and SvelteRegisterComponent and don't have the create_fragment m, p, and d functions I'm going to assume your methods of tracking with Svelte components and dom elements are going to need some adjustment (using mark_module_start and mark_module_end or something). Does Svelte 5 in RC mean that these internals have stabilized? Rich is wanting us to push Svelte 5 and I'm happy to make my tool support it, but need to figure out this component and element tracking piece first. Since you're on the core team, I'm also going to assume you already have a plan for figuring out the new system.

Anyhow, all that to say that I'm available for testing whatever you come up with and will also integrate it into my tool which will hopefully give some good feedback.