use of com.intellij.execution.remote.RemoteConfigurationType in project android by JetBrains.
the class AndroidJavaDebugger method attachToClient.
@Override
public void attachToClient(@NotNull Project project, @NotNull Client client) {
String debugPort = getClientDebugPort(client);
String runConfigName = String.format(RUN_CONFIGURATION_NAME_PATTERN, debugPort);
// Try to find existing debug session
if (hasExistingDebugSession(project, debugPort, runConfigName)) {
return;
}
// Create run configuration
RemoteConfigurationType remoteConfigurationType = RemoteConfigurationType.getInstance();
ConfigurationFactory factory = remoteConfigurationType.getFactory();
RunnerAndConfigurationSettings runSettings = RunManager.getInstance(project).createRunConfiguration(runConfigName, factory);
RemoteConfiguration configuration = (RemoteConfiguration) runSettings.getConfiguration();
configuration.HOST = "localhost";
configuration.PORT = debugPort;
configuration.USE_SOCKET_TRANSPORT = true;
configuration.SERVER_MODE = false;
ProgramRunnerUtil.executeConfiguration(project, runSettings, DefaultDebugExecutor.getDebugExecutorInstance());
}
use of com.intellij.execution.remote.RemoteConfigurationType in project buck by facebook.
the class AndroidDebugger method createRunConfiguration.
private static RunnerAndConfigurationSettings createRunConfiguration(Project project, String debugPort) {
final RemoteConfigurationType remoteConfigurationType = RemoteConfigurationType.getInstance();
final ConfigurationFactory factory = remoteConfigurationType.getFactory();
final RunnerAndConfigurationSettings runSettings = RunManager.getInstance(project).createRunConfiguration(getRunConfigurationName(debugPort), factory);
final RemoteConfiguration configuration = (RemoteConfiguration) runSettings.getConfiguration();
configuration.HOST = "localhost";
configuration.PORT = debugPort;
configuration.USE_SOCKET_TRANSPORT = true;
configuration.SERVER_MODE = false;
return runSettings;
}
Aggregations