1

I have tried run visual studio code, to build, launch and debug (using omnisharp and dotnet...) the blazor server and webasm project but It seems to only launch one project at a time even tho task.json has both of the projects? is there a way to launch both project at the same time? or to keep one executing while the other is launched in case this wasnt possible?

here is my launch.json


{
    "version": "0.2.0",
    "configurations": 
    [
        {
            // Use IntelliSense to find out which attributes exist for C# debugging
            // Use hover for the description of the existing attributes
            // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            // If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/BlazorApp/bin/Debug/net5.0/BlazorApp.dll",
            "args": [],
            "cwd": "${workspaceFolder}/BlazorApp",
            "stopAtEntry": false,
            // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
            "serverReadyAction": {
                "action": "openExternally",
                "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
            },
            "env": {
                "ASPNETCORE_ENVIRONMENT": "Development",
                "ASPNETCORE_URLS": "http://localhost:5010"
            },
            "sourceFileMap": {
                "/Views": "${workspaceFolder}/Views"
            }
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach"
        }, 
       
        {
            "type": "blazorwasm",
            "name": "Launch and Debug Blazor WebAssembly Application",
            "request": "launch"
        }
    ]
}

PontiacGTX
  • 185
  • 2
  • 15
  • 1
    Possibly this article can help you: https://swaminathanvetri.in/2021/01/02/building-modern-web-applications-with-blazor-part-ii-debugging-blazor-apps-in-vs-code/ – Jason D Sep 07 '21 at 15:57
  • @JasonD I mean i tried but the only way seemed to launch each individually – PontiacGTX Sep 07 '21 at 20:52

1 Answers1

0

the answer is using compounds parameters in the launch.json

How to run multiple tasks in VS Code on build?

as for debugging I have yet to see how to get the js debugger to work on Chrome

PontiacGTX
  • 185
  • 2
  • 15