Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Components/Web.JS/dist/Release/blazor.server.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Components/Web.JS/dist/Release/blazor.webassembly.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/Components/Web.JS/src/Platform/Mono/MonoDebugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import { WebAssemblyResourceLoader } from '../WebAssemblyResourceLoader';
const currentBrowserIsChrome = (window as any).chrome
&& navigator.userAgent.indexOf('Edge') < 0; // Edge pretends to be Chrome


let hasReferencedPdbs = false;
let debugBuild = false;

export function hasDebuggingEnabled() {
return hasReferencedPdbs && currentBrowserIsChrome;
return (hasReferencedPdbs || debugBuild) && currentBrowserIsChrome;
}

export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader) {
hasReferencedPdbs = !!resourceLoader.bootConfig.resources.pdb;

debugBuild = resourceLoader.bootConfig.debugBuild;
// Use the combination shift+alt+D because it isn't used by the major browsers
// for anything else by default
const altKeyName = navigator.platform.match(/^Mac/i) ? 'Cmd' : 'Alt';
Expand All @@ -23,7 +23,7 @@ export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader)
// Even if debugging isn't enabled, we register the hotkey so we can report why it's not enabled
document.addEventListener('keydown', evt => {
if (evt.shiftKey && (evt.metaKey || evt.altKey) && evt.code === 'KeyD') {
if (!hasReferencedPdbs) {
if (!debugBuild && !hasReferencedPdbs) {
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.');
Expand Down