Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

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

Screenshot 2025-09-26 at 14 13 00

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings September 26, 2025 06:18
@netlify
Copy link

netlify bot commented Sep 26, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 9c49084
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68d641e9045b9a0008ce9584
😎 Deploy Preview https://deploy-preview-6260--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 77 (🟢 up 14 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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

@chenjiahan chenjiahan merged commit 1d45c30 into main Sep 26, 2025
11 checks passed
@chenjiahan chenjiahan deleted the browser_logs_position_0926 branch September 26, 2025 07:48
@chenjiahan chenjiahan mentioned this pull request Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants