Skip to content

Commit 3db5c9c

Browse files
authored
Use MonoProxy package for debugging (#24721)
* Use MonoProxy package for debugging * Initial working end-to-end * Update package version and polish up dbging issues * Throw exception if DebugProxy received no output
2 parents 3c3995f + 6f780bb commit 3db5c9c

22 files changed

+58
-2829
lines changed

AspNetCore.sln

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authentication.Msal", "Auth
493493
EndProject
494494
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Authentication.WebAssembly.Msal", "src\Components\WebAssembly\Authentication.Msal\src\Microsoft.Authentication.WebAssembly.Msal.csproj", "{09F72EF0-2BDE-4B73-B116-A87E38C432FE}"
495495
EndProject
496-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DebugProxy", "DebugProxy", "{F01E5B0D-1277-481D-8879-41A87F3F9524}"
497-
EndProject
498-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.DebugProxy", "src\Components\WebAssembly\DebugProxy\src\Microsoft.AspNetCore.Components.WebAssembly.DebugProxy.csproj", "{67F51062-6897-4019-AA88-6BDB5E30B015}"
499-
EndProject
500496
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JSInterop", "JSInterop", "{44161B20-CC30-403A-AC94-247592ED7590}"
501497
EndProject
502498
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.JSInterop.WebAssembly", "src\Components\WebAssembly\JSInterop\src\Microsoft.JSInterop.WebAssembly.csproj", "{E0B1F2AA-4EBA-4DC7-92D5-2F081354C8DE}"

eng/Dependencies.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ and are generated based on the last package release.
124124
<LatestPackageReference Include="Microsoft.Internal.AspNetCore.H2Spec.All" />
125125
<LatestPackageReference Include="Microsoft.Extensions.Internal.Transport" />
126126
<LatestPackageReference Include="Microsoft.NETCore.Windows.ApiSets" />
127+
<LatestPackageReference Include="Microsoft.NETCore.BrowserDebugHost.Transport" />
127128
<LatestPackageReference Include="Microsoft.Owin.Security.Cookies" />
128129
<LatestPackageReference Include="Microsoft.Owin.Testing" />
129130
<LatestPackageReference Include="Microsoft.Web.Administration" />

eng/Version.Details.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@
306306
<Uri>https://github.com/dotnet/runtime</Uri>
307307
<Sha>1dfd9438149f74ae11918a7b0709b8d58c61443f</Sha>
308308
</Dependency>
309+
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="5.0.0-rc.1.20428.3">
310+
<Uri>https://github.com/dotnet/runtime</Uri>
311+
<Sha>1dfd9438149f74ae11918a7b0709b8d58c61443f</Sha>
312+
</Dependency>
309313
</ProductDependencies>
310314
<ToolsetDependencies>
311315
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->

eng/Versions.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
<MicrosoftNETCoreAppInternalPackageVersion>5.0.0-rc.1.20428.3</MicrosoftNETCoreAppInternalPackageVersion>
6969
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-rc.1.20428.3</MicrosoftNETCoreAppRefPackageVersion>
7070
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-rc.1.20428.3</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
71+
<MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>5.0.0-rc.1.20428.3</MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>
7172
<MicrosoftWin32RegistryPackageVersion>5.0.0-rc.1.20428.3</MicrosoftWin32RegistryPackageVersion>
7273
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-rc.1.20428.3</MicrosoftWin32SystemEventsPackageVersion>
7374
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-rc.1.20428.3</MicrosoftExtensionsCachingAbstractionsPackageVersion>

src/Components/Components.slnf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
"src\\Components\\Web.Extensions\\test\\Microsoft.AspNetCore.Components.Web.Extensions.Tests.csproj",
105105
"src\\Components\\WebAssembly\\Server\\test\\Microsoft.AspNetCore.Components.WebAssembly.Server.Tests.csproj",
106106
"src\\Components\\WebAssembly\\Authentication.Msal\\src\\Microsoft.Authentication.WebAssembly.Msal.csproj",
107-
"src\\Components\\WebAssembly\\DebugProxy\\src\\Microsoft.AspNetCore.Components.WebAssembly.DebugProxy.csproj",
108107
"src\\Components\\WebAssembly\\JSInterop\\src\\Microsoft.JSInterop.WebAssembly.csproj",
109108
"src\\Components\\WebAssembly\\WebAssembly.Authentication\\src\\Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj",
110109
"src\\Components\\WebAssembly\\WebAssembly.Authentication\\test\\Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests.csproj",

src/Components/ComponentsNoDeps.slnf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"src\\Components\\Web.Extensions\\src\\Microsoft.AspNetCore.Components.Web.Extensions.csproj",
2020
"src\\Components\\Web.Extensions\\test\\Microsoft.AspNetCore.Components.Web.Extensions.Tests.csproj",
2121
"src\\Components\\WebAssembly\\Authentication.Msal\\src\\Microsoft.Authentication.WebAssembly.Msal.csproj",
22-
"src\\Components\\WebAssembly\\DebugProxy\\src\\Microsoft.AspNetCore.Components.WebAssembly.DebugProxy.csproj",
2322
"src\\Components\\WebAssembly\\DevServer\\src\\Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj",
2423
"src\\Components\\WebAssembly\\JSInterop\\src\\Microsoft.JSInterop.WebAssembly.csproj",
2524
"src\\Components\\WebAssembly\\Sdk\\integrationtests\\Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj",
@@ -50,4 +49,4 @@
5049
"src\\Components\\test\\testassets\\TestServer\\Components.TestServer.csproj"
5150
]
5251
}
53-
}
52+
}

src/Components/Web.JS/dist/Release/blazor.webassembly.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/src/Platform/Mono/MonoDebugger.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,11 @@ import { WebAssemblyResourceLoader } from '../WebAssemblyResourceLoader';
33
const currentBrowserIsChrome = (window as any).chrome
44
&& navigator.userAgent.indexOf('Edge') < 0; // Edge pretends to be Chrome
55

6-
let isDebugging = true;
7-
8-
window.addEventListener('load', () => {
9-
const params = new URLSearchParams(window.location.search);
10-
isDebugging = params.get('_blazor_debug') === 'true';
11-
})
126

137
let hasReferencedPdbs = false;
148

159
export function hasDebuggingEnabled() {
16-
return isDebugging && hasReferencedPdbs && currentBrowserIsChrome;
10+
return hasReferencedPdbs && currentBrowserIsChrome;
1711
}
1812

1913
export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader) {
@@ -33,8 +27,6 @@ export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader)
3327
console.error('Cannot start debugging, because the application was not compiled with debugging enabled.');
3428
} else if (!currentBrowserIsChrome) {
3529
console.error('Currently, only Microsoft Edge (80+), or Google Chrome, are supported for debugging.');
36-
} else if (!isDebugging) {
37-
console.error(`_blazor_debug query parameter must be set to enable debugging. To enable debugging, go to ${location.href}?_blazor_debug=true.`);
3830
} else {
3931
launchDebugger();
4032
}

src/Components/WebAssembly/DebugProxy/src/DebugProxyOptions.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/Components/WebAssembly/DebugProxy/src/Hosting/DebugProxyHost.cs

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)