Auto attach to process in terminal which ran using custom debug run configuration

Answered

I am thinking of creating a custom debug configuration which will run the my specified go command in terminal to run the application and after the application is successfully run, attach it to debugger automatically.
Is it possible to run a process in terminal and automatically attach it to debugger?

0
4 comments

Hello,

You can run a process in terminal and attach debugger according to this guide: https://www.jetbrains.com/help/go/attach-to-running-go-processes-with-debugger.html#attach-to-a-process-on-a-local-machine

However, there is no way to automate it. You should run `go build` and Go Remote configurations manually.

I hope it helps.

0

Is there a way to 'attach a process' using a plugin (if I create a custom plugin) ? 

0

Sure. For example, Bazel plugin uses custom debug configurations for Go applications: https://github.com/bazelbuild/intellij

0

Seems interesting. Let me have a look at it.

0

Please sign in to leave a comment.