How to integrate VS Code with Tye

Viewed 70

I use VS Code and Tye (https://github.com/dotnet/tye) to run the set of .Net services. I need to configure the VS Code to attach to the service/process that was started by Tye. I can configure the task in tasks.json to run the Tye with the service in debug mode. On run, Tye prints smth like the following /^.*Listening for event pipe events for my-servce(.*) on process id (\d+)$/

How to configure tasks/launch.json in VS Code to:

  1. Run Tye and wait for the "Listening ..." string
  2. As soon as the string is detected, extract process Id (Tye is still running)
  3. Attach the debugger to the process Id extracted
  4. On detach - terminate Tye

?

0 Answers
Related