Background/Situation [Optional]
In a scenario where multiple services are being debugged using Docker Compose, there may be a need to selectively attach the debugger to only some of these services.
Question
While using Docker Compose to debug multiple services, is it possible to not attach the debugger to some?
Answer
Yes, it is possible to selectively attach the debugger to certain services when using Docker Compose with JetBrains Rider. Rider tries attaching the debugger to all containers that have a build section in the compose file. However, there is an option in the configuration to attach the debugger to the services without this section.
To configure which service the debugger should not be attached to, you can use Docker Compose Run Configuration labels: (com.jetbrains.rider.debug: "false"). This allows you to specify for which services you wish to attach the debugger when running the compose.
This solution should help in managing debugging in scenarios where you have multiple services, but only wish to attach the debugger to a select few.
Comments
0 comments
Please sign in to leave a comment.