How to debug/attach vscode to the browser that Aspire launches? #6981
Unanswered
toddsmith-adsk
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
By default, Aspire is replying on the AppHost project's launchSettings.json to determine if it should launch the browser. When it does, there doesn't seem to be a way to set a command line arguments such as --remote-debugging-port=9222.
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17272;http://localhost:15106",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21102",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22144",
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15106",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19164",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20196"
}
}
}
}
I've verified that if I launch the browser myself with --remote-debugging-port=9222 I can then attach the debugger from vscode and debug an app that is started with builder.AddNpmApp("react", .......). But without the --remote-debugging-port option I can't attach the vscode debugger.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions