How to integrate VS Code with Tye

126 views Asked by At

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

?

1

There are 1 answers

0
CER On

I have found that the easiest way to debug using Tye is:

  1. Download/Install the VS Code extension.
  2. Run tye run --debug *
  3. Go to extension in VS Code and attach to service you would like to debug.

enter image description here