Skip to content

Commit

Permalink
feat: pause on debugger for full page reloads in dev (#9305)
Browse files Browse the repository at this point in the history
closes #9284
  • Loading branch information
Rich-Harris committed Mar 8, 2023
1 parent 78b4a1b commit 1c32723
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
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 @@ -1181,6 +1181,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

0 comments on commit 1c32723

Please sign in to comment.