The debugger not working on client side file (Firefox)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
This is only a bug on Firefox and not Chrome
When creating a launch.json file in vscode we can set configurations to attach vscode debugger to node and the browser.
this can be achieved by this
{
"configurations": [
{
"name": "Launch Server",
"request": "launch",
"type": "node",
"runtimeArgs": ["run","dev"],
"runtimeExecutable": "npm",
"skipFiles": ["<node_internals>/**"],
"console": "integratedTerminal"
},
{
"type": "firefox",
"request": "launch",
"name": "Launch Firefox",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
}
],
"compounds": [
{
"name": "Compound",
"configurations": ["Launch Server","Launch Firefox"]
}
]
}
now by running the Compound runner, we can see vscode and Firefox working together on the breakpoints, but unfortunately, the break points don't work on client-side code in files like +layout.ts
-- test 1
Browser => Firefox 122.0.1 (64-bit)
OS => Windows 11 build 22621 WSL2
-- test 2
Browser => Firefox 123.0b8 (64-bit)
OS => MacOS Sonoma 14.2.1
Reproduction
use this lunch config
{
"configurations": [
{
"name": "Launch Server",
"request": "launch",
"type": "node",
"runtimeArgs": ["run","dev"],
"runtimeExecutable": "npm",
"skipFiles": ["<node_internals>/**"],
"console": "integratedTerminal"
},
{
"type": "firefox",
"request": "launch",
"name": "Launch Firefox",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
}
],
"compounds": [
{
"name": "Compound",
"configurations": ["Launch Server","Launch Firefox"]
}
]
}
Logs
No response
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700KF
Memory: 10.24 GB / 15.55 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 20.10.0 - ~/.volta/tools/image/node/20.10.0/bin/node
npm: 10.2.3 - ~/.volta/tools/image/node/20.10.0/bin/npm
pnpm: 8.14.0 - ~/.volta/bin/pnpm
bun: 1.0.14 - ~/.volta/bin/bun
npmPackages:
@sveltejs/adapter-auto: ^3.0.1 => 3.0.1
@sveltejs/adapter-node: ^2.0.2 => 2.0.2
@sveltejs/adapter-static: ^3.0.1 => 3.0.1
@sveltejs/kit: ^2.0.6 => 2.0.6
@sveltejs/vite-plugin-svelte: ^3.0.1 => 3.0.1
svelte: ^4.2.8 => 4.2.8
vite: ^5.0.12 => 5.0.12
-------------------------------------------------------
System:
OS: macOS 14.2.1
CPU: (8) arm64 Apple M2
Memory: 74.22 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
Browsers:
Chrome: 121.0.6167.160
Safari: 17.2.1
npmPackages:
@sveltejs/adapter-auto: ^3.0.1 => 3.0.0
@sveltejs/adapter-node: ^2.0.2 => 2.0.0
@sveltejs/adapter-static: ^3.0.1 => 3.0.0
@sveltejs/kit: ^2.0.6 => 2.0.3
@sveltejs/vite-plugin-svelte: ^3.0.1 => 3.0.1
svelte: ^4.2.8 => 4.2.8
vite: ^5.0.12 => 5.0.10
Severity
serious, but I can work around it
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the supplied VS Code compound launch configuration and a breakpoint in +layout.ts, using Firefox rather than Chrome. Inspect the SvelteKit/Vite client debugging and source-map path; done means client-side breakpoints work in Firefox with the documented configuration. No repository file or test is identified in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite, vscode
- Domain
- developer-experience, devtools, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100