How to set a run/debug configuration by java code?
I want to start another debug session where the configuration can not be determined from start
And when the fisrt application runs to somecode, I want to start the second application and debug it
so any way to set the configuration and run/debug it from code?
I just know how to run/debug a configuration from code lile below
RunManager instance = RunManager.getInstance(project);
RunnerAndConfigurationSettings runnerAndConfigurationSettings = instance.getSelectedConfiguration();
but I have no idea about how to create a RunnerAndConfigurationSettings object by code
I saw there are some methods of RunManager that seems to be able to create. However I can not figure out how to use them.