❔ How to set a custom start URL for an API from launch.json (VS Code)
I'm working on an
ASP.Net core 7
ASP.Net core 7
web API, I use
VS Code
VS Code
, in the
launch.json
launch.json
file I have this configuration:
"name": "Backend API", "type": "coreclr", "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. "program": "${workspaceFolder}/src/Web.API/bin/Debug/net7.0/Web.API.dll", "args": [], "cwd": "${workspaceFolder}/src/Web.API", "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" }, "sourceFileMap": { "/Views": "${workspaceFolder}/Views" }
"name": "Backend API", "type": "coreclr", "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. "program": "${workspaceFolder}/src/Web.API/bin/Debug/net7.0/Web.API.dll", "args": [], "cwd": "${workspaceFolder}/src/Web.API", "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" }, "sourceFileMap": { "/Views": "${workspaceFolder}/Views" }