Skip to content

Commit 1c32723

Browse files
authored
feat: pause on debugger for full page reloads in dev (#9305)
closes #9284
1 parent 78b4a1b commit 1c32723

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.changeset/good-countries-enjoy.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': minor
3+
---
4+
5+
feat: pause on debugger when falling back to full page reload during development

packages/kit/src/runtime/client/client.js

+9
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,15 @@ export function create_client(app, target) {
11811181
route
11821182
});
11831183
}
1184+
1185+
if (__SVELTEKIT_DEV__) {
1186+
console.error(
1187+
'An error occurred while loading the page. This will cause a full page reload. (This message will only appear during development.)'
1188+
);
1189+
1190+
debugger;
1191+
}
1192+
11841193
return await native_navigation(url);
11851194
}
11861195

0 commit comments

Comments
 (0)