|
|
@@ -3,17 +3,11 @@ import { WebAssemblyResourceLoader } from '../WebAssemblyResourceLoader';
|
|
|
const currentBrowserIsChrome = (window as any).chrome
|
|
|
&& navigator.userAgent.indexOf('Edge') < 0; // Edge pretends to be Chrome
|
|
|
|
|
|
-let isDebugging = true;
|
|
|
-
|
|
|
-window.addEventListener('load', () => {
|
|
|
- const params = new URLSearchParams(window.location.search);
|
|
|
- isDebugging = params.get('_blazor_debug') === 'true';
|
|
|
-})
|
|
|
|
|
|
let hasReferencedPdbs = false;
|
|
|
|
|
|
export function hasDebuggingEnabled() {
|
|
|
- return isDebugging && hasReferencedPdbs && currentBrowserIsChrome;
|
|
|
+ return hasReferencedPdbs && currentBrowserIsChrome;
|
|
|
}
|
|
|
|
|
|
export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader) {
|
|
|
@@ -33,8 +27,6 @@ export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader)
|
|
|
console.error('Cannot start debugging, because the application was not compiled with debugging enabled.');
|
|
|
} else if (!currentBrowserIsChrome) {
|
|
|
console.error('Currently, only Microsoft Edge (80+), or Google Chrome, are supported for debugging.');
|
|
|
- } else if (!isDebugging) {
|
|
|
- console.error(`_blazor_debug query parameter must be set to enable debugging. To enable debugging, go to ${location.href}?_blazor_debug=true.`);
|
|
|
} else {
|
|
|
launchDebugger();
|
|
|
}
|