Skip to content
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

[Feature Request] Enhance HMR compile error messages with detailed debugging information #27577

Open
nestarz opened this issue Jan 7, 2025 · 0 comments · May be fixed by #27597
Open

[Feature Request] Enhance HMR compile error messages with detailed debugging information #27577

nestarz opened this issue Jan 7, 2025 · 0 comments · May be fixed by #27597
Labels
suggestion suggestions for new features (yet to be agreed)

Comments

@nestarz
Copy link

nestarz commented Jan 7, 2025

When Hot Module Replacement (HMR) fails due to a compilation error, the current error message is minimal and doesn't provide enough context to quickly debug the issue.

Current behavior

HMR Failed to reload module file:///path/to/file.tsx: compile error.
HMR Restarting! File change detected: "/path/to/file.tsx"

Proposed behavior

According to the Chrome DevTools Protocol (https://chromedevtools.github.io/devtools-protocol/v8/Debugger/), we can access more detailed error information through Runtime.ExceptionDetails when the status is CompileError.

Proposed Enhancement

Include the exception details from Runtime.ExceptionDetails in the HMR error message to help developers quickly identify and fix compilation issues.

@marvinhagemeister marvinhagemeister added the suggestion suggestions for new features (yet to be agreed) label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants