Auto attach to process in terminal which ran using custom debug run configuration
已回答
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?
请先登录再写评论。
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.
Is there a way to 'attach a process' using a plugin (if I create a custom plugin) ?
Sure. For example, Bazel plugin uses custom debug configurations for Go applications: https://github.com/bazelbuild/intellij
Seems interesting. Let me have a look at it.