sveltejs / sveltejs/kit

Incorrect source line number reported by `$inspect()`

Open
#15,149 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

awaiting submitter
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the bug

In a big and complex Kit project when I use $inspect() the source line number suggested in browser's console is wrong.

I don't know if there is already an issue opened for this: I cannot find one.

Do you know if I can try something to see if it works?

Reproduction

I'll create a reproduction ASAP: is not easy.

Logs

System Info
"@sveltejs/adapter-static": "3.0.10",
"@sveltejs/kit": "2.49.4",
"@sveltejs/vite-plugin-svelte": "6.2.4",
"svelte": "5.46.1",
Severity

serious, but I can work around it

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by creating the reproduction promised in the issue using the listed SvelteKit, Vite plugin, adapter, and Svelte versions. Compare the source location reported by $inspect() with the actual browser-console location in a complex Kit project; done means the reported line points to the relevant source.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, vite
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.