How do I make a custom runner that launches a configuration with a custom command-line prefix?

Answered

I'm making a CLion plugin for a third-party debugging/profiling tool. This tool is launched via the command line `tool [executablePath] [executableArgs]`.

 

I've been successful in making a custom `Executor` and associated `Runner` (extending DefaultProgramRunner). However, I can't figure out for the life of me what to put in `doExecute` to prefix the command that is typically run with my tool command. I am receiving a CidrCommandLineState as expected for CMake targets, but can't figure out how to change the command it calls.

 

How do I do this?

0
1 comment

Hi,

You can try implementing `RunConfigurationExtensionBase` and overriding `patchCommandLine()` where you would prepend `GeneralCommandLine` with whatever you require. I believe it would be the best option.

0

Please sign in to leave a comment.