feat: add full stack trace option for browser logs#6427
Merged
chenjiahan merged 2 commits intomainfrom Oct 24, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
BrowserLogsStackTracetype to include 'full' option - Refactored stack trace formatting logic into smaller, reusable functions
- Added
formatFullStackfunction 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.
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
browserLogs: stackTrace: 'full'option to display complete stack traces in browser logsChecklist