Created
August 27, 2022 19:08
-
-
Save DarqueWarrior/7acb367b5a0163cfd065954b8d16919d to your computer and use it in GitHub Desktop.
How to launch 3 Dapr services at the same time with debug enabled. You can set breakpoints in all three services and step from one to the other.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"compounds": [ | |
// For more information, visit: https://code.visualstudio.com/docs/editor/debugging#_compound-launch-configurations | |
{ | |
"name": "All Services", | |
"preLaunchTask": "build", | |
"configurations": [ | |
"ServiceA", | |
"ServiceB", | |
"ServiceC" | |
], | |
"stopAll": true | |
} | |
], | |
"configurations": [ | |
{ | |
"name": "ServiceA", | |
"type": "coreclr", | |
"request": "launch", | |
"preLaunchTask": "run_ServiceA", | |
"program": "${workspaceFolder}/src/serviceA/bin/Debug/net6.0/serviceA.dll", | |
"args": [], | |
"cwd": "${workspaceFolder}/src/serviceA", | |
"stopAtEntry": false, | |
"env": { | |
"ASPNETCORE_ENVIRONMENT": "Development", | |
"ASPNETCORE_URLS": "http://localhost:5000" | |
}, | |
"postDebugTask": "stop_ServiceA" | |
}, | |
{ | |
"name": "ServiceB", | |
"type": "coreclr", | |
"request": "launch", | |
"preLaunchTask": "run_ServiceB", | |
"program": "${workspaceFolder}/src/serviceB/bin/Debug/net6.0/serviceB.dll", | |
"args": [], | |
"cwd": "${workspaceFolder}/src/serviceB", | |
"stopAtEntry": false, | |
"env": { | |
"ASPNETCORE_ENVIRONMENT": "Development", | |
"ASPNETCORE_URLS": "http://localhost:5010" | |
}, | |
"postDebugTask": "stop_ServiceB" | |
}, | |
{ | |
"name": "ServiceC", | |
"type": "coreclr", | |
"request": "launch", | |
"preLaunchTask": "run_ServiceC", | |
"program": "${workspaceFolder}/src/serviceC/bin/Debug/net6.0/serviceC.dll", | |
"args": [], | |
"cwd": "${workspaceFolder}/src/serviceC", | |
"stopAtEntry": false, | |
"env": { | |
"ASPNETCORE_ENVIRONMENT": "Development", | |
"ASPNETCORE_URLS": "http://localhost:5020" | |
}, | |
"postDebugTask": "stop_ServiceC" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "build", | |
"command": "dotnet", | |
"type": "process", | |
"args": [ | |
"build", | |
"${workspaceFolder}/src/services.sln", | |
"/property:GenerateFullPaths=true", | |
"/consoleloggerparameters:NoSummary" | |
], | |
"problemMatcher": "$msCompile" | |
}, | |
{ | |
"label": "run_ServiceA", | |
"appId": "serviceA", | |
"appPort": 5000, | |
"httpPort": 3500, | |
"grpcPort": 50001, | |
"type": "dapr" | |
}, | |
{ | |
"label": "stop_ServiceA", | |
"appId": "serviceA", | |
"type": "daprd-down" | |
}, | |
{ | |
"label": "run_ServiceB", | |
"appId": "serviceB", | |
"appPort": 5010, | |
"grpcPort": 50002, | |
"type": "dapr" | |
}, | |
{ | |
"label": "stop_ServiceB", | |
"appId": "serviceB", | |
"type": "daprd-down" | |
}, | |
{ | |
"label": "run_ServiceC", | |
"appId": "serviceC", | |
"appPort": 5020, | |
"grpcPort": 50003, | |
"type": "dapr" | |
}, | |
{ | |
"label": "stop_ServiceC", | |
"appId": "serviceC", | |
"type": "daprd-down" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment