Search in sources :

Example 1 with DlvRemoteVmConnection

use of com.goide.dlv.DlvRemoteVmConnection in project intellij by bazelbuild.

the class BlazeGoDebugRunner method doExecute.

protected RunContentDescriptor doExecute(ExecutionEnvironment environment, BlazeGoDummyDebugProfileState blazeState) throws ExecutionException {
    EventLoggingService.getInstance().logEvent(getClass(), "debugging-go");
    GoApplicationRunningState goState = blazeState.toNativeState(environment);
    ExecutionResult executionResult = goState.execute(environment.getExecutor(), this);
    return XDebuggerManager.getInstance(environment.getProject()).startSession(environment, new XDebugProcessStarter() {

        @Override
        public XDebugProcess start(XDebugSession session) {
            RemoteVmConnection<?> connection = new DlvRemoteVmConnection(DlvDisconnectOption.KILL);
            XDebugProcess process = new DlvDebugProcess(session, connection, executionResult, /* remote= */
            true);
            connection.open(goState.getDebugAddress());
            return process;
        }
    }).getRunContentDescriptor();
}
Also used : XDebugSession(com.intellij.xdebugger.XDebugSession) DlvDebugProcess(com.goide.dlv.DlvDebugProcess) XDebugProcess(com.intellij.xdebugger.XDebugProcess) GoApplicationRunningState(com.goide.execution.application.GoApplicationRunningState) XDebugProcessStarter(com.intellij.xdebugger.XDebugProcessStarter) ExecutionResult(com.intellij.execution.ExecutionResult) DlvRemoteVmConnection(com.goide.dlv.DlvRemoteVmConnection)

Aggregations

DlvDebugProcess (com.goide.dlv.DlvDebugProcess)1 DlvRemoteVmConnection (com.goide.dlv.DlvRemoteVmConnection)1 GoApplicationRunningState (com.goide.execution.application.GoApplicationRunningState)1 ExecutionResult (com.intellij.execution.ExecutionResult)1 XDebugProcess (com.intellij.xdebugger.XDebugProcess)1 XDebugProcessStarter (com.intellij.xdebugger.XDebugProcessStarter)1 XDebugSession (com.intellij.xdebugger.XDebugSession)1