I am trying to debug my Blazor WASM hosted project, but I get the following error when I run the project:
I don't understand why.
All breakpoints in the server project hit just fine. One thing I noted when I go to Debug->Windows->Modules, I can see the Server project listed there, but I don't see the Client project in the list. Why would that be?
I have gone through many project settings as well, but I cannot figure out what's wrong.
I am using Visual Studio 2022 latest version and application is on .NET9, Blazor WASM, hosted application with Server, Client and Shared projects.
launchSettings.json
in the Server project:
{
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"IMS5_1.Server": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"dotnetRunMessages": "true"
},
"WSL": {
"commandName": "WSL2",
"launchBrowser": true,
"launchUrl": "https://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000"
},
"distributionName": "Ubuntu",
"dotnetRunMessages": "true"
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:31647",
"sslPort": 44346
}
}
}
launchSettings.json
in the Client project:
{
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"nativeDebugging": true
},
"WSL": {
"commandName": "WSL2",
"distributionName": ""
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:61992/",
"sslPort": 44382
}
}
}
Any ideas? This is just driving me crazy...
I am trying to debug my Blazor WASM hosted project, but I get the following error when I run the project:
I don't understand why.
All breakpoints in the server project hit just fine. One thing I noted when I go to Debug->Windows->Modules, I can see the Server project listed there, but I don't see the Client project in the list. Why would that be?
I have gone through many project settings as well, but I cannot figure out what's wrong.
I am using Visual Studio 2022 latest version and application is on .NET9, Blazor WASM, hosted application with Server, Client and Shared projects.
launchSettings.json
in the Server project:
{
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"IMS5_1.Server": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"dotnetRunMessages": "true"
},
"WSL": {
"commandName": "WSL2",
"launchBrowser": true,
"launchUrl": "https://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000"
},
"distributionName": "Ubuntu",
"dotnetRunMessages": "true"
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:31647",
"sslPort": 44346
}
}
}
launchSettings.json
in the Client project:
{
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"nativeDebugging": true
},
"WSL": {
"commandName": "WSL2",
"distributionName": ""
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:61992/",
"sslPort": 44382
}
}
}
Any ideas? This is just driving me crazy...
Share Improve this question asked Feb 2 at 12:41 user3656651user3656651 8223 gold badges17 silver badges28 bronze badges1 Answer
Reset to default 0Hit and trial, I figured it out. The following 2 things:
I had
<DebuggerSupport>true</DebuggerSupport>
in the client project file. I removed it.The wasm modules debugging still doesn't work on Firefox. But now it works on Edge and Chrome.