Extending default remote debugger

Hi,

I'm developing a plugin to just extend the already defined "Remote" profile for remote java debug.

 

My intent is to automate the host;port parameter. I found the class

RemoteDebugConfiguration

 which need a 

public XDebugProcess createDebugProcess(

implemented. But I don't want re-implement things, I need the default XDebugProcess.

 

Any help?

 

4 comments

Hi, have a look at com.intellij.execution.remote.RemoteConfiguration, you may try to extend it and override getState providing your own RunProfileState with RemoteConnection you need.

Otherwise have a look at how GenericDebuggerRunner works, it is responsible for debugger startup.

0

Yes, this is what I'm trying to do, but there is NO documentation at all for creating an XDebugProcess instance.

 

See this:

package it.dwind.kwind.configurator;

import com.intellij.execution.ExecutionException;
import com.intellij.execution.ExecutionResult;
import com.intellij.execution.configurations.ConfigurationFactory;
import com.intellij.execution.configurations.RunConfiguration;
import com.intellij.execution.runners.ExecutionEnvironment;
import com.intellij.openapi.options.SettingsEditor;
import com.intellij.openapi.project.Project;
import com.intellij.xdebugger.XDebugProcess;
import com.intellij.xdebugger.XDebugSession;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.debugger.RemoteDebugConfiguration;

import java.net.InetSocketAddress;

/**
* Created by vtarricone on 03/03/17.
*/
public class RemoteKwindConfiguration extends RemoteDebugConfiguration /*RunConfigurationBase*/ {


public RemoteKwindConfiguration(Project project, @NotNull ConfigurationFactory configurationFactory, String name, int i) {

super(project, configurationFactory, name, i);
}

@NotNull
@Override
public SettingsEditor<? extends RunConfiguration> getConfigurationEditor() {

return new RemoteKwindSettingsEditor();
}

@NotNull
@Override
public XDebugProcess createDebugProcess(@NotNull InetSocketAddress inetSocketAddress, @NotNull XDebugSession session, @Nullable ExecutionResult executionResult, @NotNull ExecutionEnvironment executionEnvironment) throws ExecutionException {

//THIS IS AN ABSTRACT IMPL

return ?????????????????
}
}

 

I need to create the default debugger. How?

 

0

com.intellij.execution.remote.RemoteConfiguration, not org.jetbrains.debugger.RemoteDebugConfiguration

0

Please sign in to leave a comment.