-
-
Notifications
You must be signed in to change notification settings - Fork 237
feat: enhance browser logs with source file locations #6260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds stacktrace parsing and source map support to display original file locations in browser error logs, enhancing developer debugging experience by showing source file locations instead of built bundle locations.
- Enhanced runtime error handling with stacktrace parsing and source map integration
- Updated client-side error collection to include stack traces
- Refactored build manager and socket server architecture to support source map resolution
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/server/socketServer.ts | Added stacktrace parsing, source map resolution, and enhanced runtime error handling |
| packages/core/src/server/devServer.ts | Updated BuildManager constructor to pass context instead of environments |
| packages/core/src/server/buildManager.ts | Refactored constructor to accept context and provide file system access to SocketServer |
| packages/core/src/server/assets-middleware/middleware.ts | Updated function call to use renamed getFileFromUrl function |
| packages/core/src/server/assets-middleware/getFileFromUrl.ts | Renamed function from getFilenameFromUrl to getFileFromUrl |
| packages/core/src/client/hmr.ts | Enhanced client-side error collection to capture and send stack traces |
| packages/core/prebundle.config.mjs | Added source-map dependency to prebundle configuration |
| packages/core/package.json | Added stacktrace-parser dependency |
| e2e/cases/browser-logs/unhandled-rejection/index.test.ts | Updated test expectations to include source file locations |
| e2e/cases/browser-logs/error/index.test.ts | Updated test expectations to include source file locations |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting

Summary
Add stacktrace parsing and source map support to display original file locations in browser error logs:
Related Links
Checklist