In projects using Vite the Debugger seems to crash when using breakpoints
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox-esr91 fixed, firefox96 fixed, firefox97 fixed)
People
(Reporter: flaki, Assigned: bomsy, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
Reproduction steps:
- Clone https://github.com/vuejs/petite-vue
yarn && yarn dev
- Open devtools
- Place a breakpoint in one of the TS files (e.g.
src/directives/for.ts
) - Reload the page with the devtools open
The result is Firefox reporting that the debugger has crashed, probably applies to other projects using Vite as well.
Error: source source-http://localhost:3000/src/directives/for.ts/originalSource-7c71a04884cf3b75848b5c8a20d28a13 does not exist
in Connect(SecondaryPanes)
in div
in div
in SplitBox
in div
in A11yIntention
in AppErrorBoundary
in div
in App
in Connect(App)
in Provider
in Provider
Updated•3 years ago
|
Comment 1•2 years ago
|
||
Thank you for the report!
I tried to reproduce the problem on my machine, but I can't see the Debugger crash.
Here is what I am doing
- Clone https://github.com/vuejs/petite-vue
- yarn && yarn dev
- Open devtools on http://localhost:3000/
- Adding BP into src/client.ts, line 50 (btw. I don't see src/directives/for.ts file, perhaps the repo changed since the bug has been filed?)
- Reloading the page
- Hitting the BP, all OK
What exactly should I do to repro the problem?
Does my step work for you?
Comment 2•2 years ago
|
||
Nicolas reproduced the issue once, can you share the STRs once you narrowed them down.
Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
The issue here was sourcemapped (original) files are throttled using the SourceQueue so
sometimes on reload the original sources gets created late, and the source for the selected frame
does not yet exist when it is needed.
The SourceQueue is currently only used to for sourcemapped files, it's worth using the
opportunity to clean it all up.
Depends on D132917
Comment 5•2 years ago
|
||
(tested Hubert's patch that seems to fix the issue)
Assignee | ||
Comment 6•2 years ago
|
||
Adding a more specific STR which reproduces the issue for me
- Clone https://github.com/vuejs/petite-vue
- yarn && yarn dev
- Open devtools on http://localhost:3000/
- Go to http://localhost:3000/tests/html.html
- Open the debugger
- Click this source from the source tree
Users/hubertbomamanilla/Projects/petite-vue/src/
->app.ts
- Set breakpoint on line 13
- Reload the page
ER
The debugger should pause on breakpoint
AR
The debugger crashes
Comment 11•2 years ago
|
||
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4f480706ada6 [devtools] Display a console warning instead of throwing error (causing a debugger crash) r=nchevobbe
Comment 12•2 years ago
|
||
bugherder |
Assignee | ||
Comment 13•2 years ago
|
||
Comment on attachment 9253839 [details]
Bug 1739382 - [devtools] Display a console warning instead of throwing error (causing a debugger crash) r=nchevobbe
Beta/Release Uplift Approval Request
- User impact if declined: Debugger panel crashes
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): It small javascript change. It stops throwing errors (which causes crashing), instead logs warning to the browser console
- String changes made/needed:
Comment 14•2 years ago
|
||
:bomsy can you attach D132918 to a new bug for better tracking purposes?
Also does this need to be uplifted for ESR as well?
Comment 15•2 years ago
|
||
Comment on attachment 9253839 [details]
Bug 1739382 - [devtools] Display a console warning instead of throwing error (causing a debugger crash) r=nchevobbe
Approved for 96.0b3
Comment 16•2 years ago
|
||
bugherder uplift |
Comment 17•2 years ago
|
||
Comment on attachment 9253840 [details]
Bug 1739382 - [devtools] Remove sourceQueue used for sourcemapped files r=ochameau
Revision D132918 was moved to bug 1745143. Setting attachment 9253840 [details] to obsolete.
Assignee | ||
Comment 18•2 years ago
|
||
Comment on attachment 9253839 [details]
Bug 1739382 - [devtools] Display a console warning instead of throwing error (causing a debugger crash) r=nchevobbe
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Helps avoid potential crash scenario
- User impact if declined: Devtools debugger will crash if a scenario where a source is not found.
- Fix Landed on Version: 97
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Stops throwing errors, instead logs error to browser console
- String or UUID changes made by this patch:
Assignee | ||
Comment 19•2 years ago
•
|
||
Also does this need to be uplifted for ESR as well?
Yes it would benefit from avoiding that potential crash scenario.
Comment 20•2 years ago
|
||
Comment on attachment 9253839 [details]
Bug 1739382 - [devtools] Display a console warning instead of throwing error (causing a debugger crash) r=nchevobbe
Approved for 91.5esr.
Comment 21•2 years ago
|
||
bugherder uplift |
Description
•