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

pause on debugger for full page reloads in dev #9305

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/good-countries-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': minor
---

feat: pause on debugger when falling back to full page reload during development
9 changes: 9 additions & 0 deletions packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,15 @@ export function create_client(app, target) {
route
});
}

if (__SVELTEKIT_DEV__) {
console.error(
'An error occurred while loading the page. This will cause a full page reload. (This message will only appear during development.)'
);

debugger;
}

return await native_navigation(url);
}

Expand Down