Resources on how to make custom run configuration debuggable / attach debugger

Answered

Basically what I want to be able to do is run my code inside of a docker container. For that I have a custom RunConfiguration extending RunConfigurationBase, whichs getState method returns an instance of a class which extens CommandLineState.

What I am doing is that I upload the dependencies and stuff into the container and use docker exec to run the class. This works fine.

What I am struggeling with is:
- How do I make my RunConfiguration / RunState debuggable (so that the debug item appears)
- How do I make my RunConfiguration attach a debugger to a remote java process started in debug mode?

Do you have any helpful code snippets, resources or other plugins code I can take a look at?

1 comment
Comment actions Permalink

Copied from Slack

---

you need to implement a class that extends GenericDebuggerRunner and override canRun() and attachVirtualMachine() methods

sample https://github.com/camel-tooling/camel-idea-plugin/tree/main/camel-idea-plugin/src/main/java/com/github/cameltooling/idea/runner

 

0

Please sign in to leave a comment.