Skip to content

feat: add full stack trace option for browser logs#6427

Merged
chenjiahan merged 2 commits intomainfrom
browser_logs_full_1024
Oct 24, 2025
Merged

feat: add full stack trace option for browser logs#6427
chenjiahan merged 2 commits intomainfrom
browser_logs_full_1024

Conversation

@chenjiahan
Copy link
Member

Summary

  • Add browserLogs: stackTrace: 'full' option to display complete stack traces in browser logs
  • Refactor stack trace formatting logic for better maintainability
  • Add e2e tests
Screenshot 2025-10-24 at 16 39 14

Checklist

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

Copilot AI review requested due to automatic review settings October 24, 2025 09:00
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

This PR adds support for displaying complete stack traces in browser logs through a new browserLogs.stackTrace: 'full' configuration option. Previously, only 'summary' (first frame) or 'none' were available.

Key changes:

  • Extended BrowserLogsStackTrace type to include 'full' option
  • Refactored stack trace formatting logic into smaller, reusable functions
  • Added formatFullStack function to process and format all frames in a stack trace

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

File Description
packages/core/src/types/config.ts Added 'full' option to BrowserLogsStackTrace type and updated documentation
packages/core/src/server/browserLogs.ts Refactored stack trace formatting with new helper functions and implemented full stack trace display
e2e/cases/browser-logs/stack-trace-full/* Added e2e test case for basic full stack trace functionality
e2e/cases/browser-logs/stack-trace-full-react-error/* Added e2e test case for full stack trace with React errors

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@netlify
Copy link

netlify bot commented Oct 24, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit ae42328
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68fb46da631b730008161a65
😎 Deploy Preview https://deploy-preview-6427--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: 57 (🔴 down 20 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.

@chenjiahan chenjiahan merged commit f8438b2 into main Oct 24, 2025
11 checks passed
@chenjiahan chenjiahan deleted the browser_logs_full_1024 branch October 24, 2025 10:03
@chenjiahan chenjiahan mentioned this pull request Oct 30, 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.

1 participant

Comments