-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
feat: forward browser console logs and errors to dev server terminal #20916
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
Merged
sapphi-red
merged 66 commits into
vitejs:main
from
hi-ogawa:10-10-feat_log_unhandled_runtime_error_on_server
Mar 5, 2026
Merged
Changes from 57 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
c897df2
feat: log unhandled runtime error on server
hi-ogawa c9fb028
tweak
hi-ogawa 13958cf
test: add test
hi-ogawa e8ea26a
cleanup
hi-ogawa 67c7ac2
feat: add forwardRuntimeLogs
hi-ogawa bfd7a89
docs: add server.forwardRuntimeLogs documentation
hi-ogawa b6e589c
docs
hi-ogawa b8db0dc
docs: improve grammar in forwardRuntimeLogs documentation
hi-ogawa f2a7d2f
test: on ci
hi-ogawa 807df92
chore: cleanup
hi-ogawa 5c86a99
tweak
hi-ogawa cd90e31
cleanup
hi-ogawa f32e11e
fix: windows
hi-ogawa 991a5d4
chore: comment
hi-ogawa 42d364d
refactor: tweak types
hi-ogawa f674955
chore: more types
hi-ogawa 0dc47db
fix: setupRuntimeLogHandler only when enabled
hi-ogawa 3b1a07f
Merge branch 'main' into 10-10-feat_log_unhandled_runtime_error_on_se…
hi-ogawa 9e73e33
Merge branch 'main' into 10-10-feat_log_unhandled_runtime_error_on_se…
hi-ogawa 3dd1d0c
chore: license.md
hi-ogawa ba3dad0
fix: fix types
hi-ogawa 7e91b45
feat: rename runtime log feature to forward console
hi-ogawa d3ee05b
feat: make server.forwardConsole configurable
hi-ogawa f9633bf
test: add console.error forwarding case
hi-ogawa 87cde9f
fix: internal types
hi-ogawa 592545c
feat: distinguish unhandled rejection in forwarded console events
hi-ogawa 2c9cce4
refactor: simplify forwarded unhandled error capture
hi-ogawa 8b81eb5
chore: no highlight
hi-ogawa 9557e2d
style: use console.level log prefix
hi-ogawa 0605f14
refactor: resolve forwardConsole options in server config
hi-ogawa cd80b84
refactor: colocate forwardConsole option resolver in server config
hi-ogawa 3bb54b0
chore: cleanup
hi-ogawa 59578ad
refactor: simplify client.ts types
hi-ogawa c25c697
refactor: share forwardConsole option types
hi-ogawa df65703
test: add dependency stack scenario for forward console
hi-ogawa 8e7d09d
test: simplify
hi-ogawa aed804e
test: test error from dependency
hi-ogawa feb3f19
fix: apply external dependency source maps in forwarded stacks
hi-ogawa e0f9809
refactor: reuse sourcemap extraction for forwarded stacks
hi-ogawa e6e6d6d
chore: comment
hi-ogawa 016bb9e
feat: auto-enable forwardConsole for AI agents
hi-ogawa 55b7587
test: fix windows
hi-ogawa 6e8e71a
Merge branch 'main' into 10-10-feat_log_unhandled_runtime_error_on_se…
hi-ogawa 502c6df
chore: comment
hi-ogawa 62cc26d
refactor: align forwarded console formatting behavior
hi-ogawa 2554c9e
test: cover formatConsoleArgs with unit cases
hi-ogawa 91f947f
chore: comment
hi-ogawa c5cb816
refactor: support custom forwardConsole log levels
hi-ogawa f019f9c
chore: fix forwardConsole formatter lint warnings
hi-ogawa 519f272
docs: tweak
hi-ogawa 4262b51
test: more unit
hi-ogawa 2d3b96c
experiment: enable by default
hi-ogawa 98874d5
test: update hmr.spec.ts so it passes with forwardConsole
hi-ogawa 3eab10c
test: debug
hi-ogawa 3d29827
test: stripVTControlCharacters
hi-ogawa 9eac5d5
test: cleanup
hi-ogawa df818e7
Revert "experiment: enable by default"
hi-ogawa 99c1843
Merge branch 'main' into 10-10-feat_log_unhandled_runtime_error_on_se…
hi-ogawa e0d0648
chore: merge main
sapphi-red 7089143
chore: update @vitest/utils
sapphi-red 78dbc4d
refactor: move forwardConsole test path
sapphi-red 98a0144
chore: fix types
sapphi-red 76ebaa1
Merge branch 'main' into 10-10-feat_log_unhandled_runtime_error_on_se…
hi-ogawa 33a8810
refactor: use escapeReplacement
hi-ogawa 56907ea
fix: determineAgent only if null
hi-ogawa 7b9a819
fix: typo
hi-ogawa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Used beta because it needs fix from vitest-dev/vitest#9152