Search in sources :

Example 1 with Logging

use of org.dartlang.vm.service.logging.Logging in project flutter-intellij by flutter.

the class DartVmServiceDebugProcessZ method onConnectSucceeded.

private void onConnectSucceeded(VmService vmService, VmOpenSourceLocationListener vmOpenSourceLocationListener) {
    final DartVmServiceListener vmServiceListener = new DartVmServiceListener(this, (DartVmServiceBreakpointHandler) myBreakpointHandlers[0]);
    final DartVmServiceBreakpointHandler breakpointHandler = (DartVmServiceBreakpointHandler) myBreakpointHandlers[0];
    myVmOpenSourceLocationListener = vmOpenSourceLocationListener;
    myVmServiceWrapper = new VmServiceWrapper(this, vmService, vmServiceListener, myIsolatesInfo, breakpointHandler);
    final ScriptProvider provider = (isolateId, scriptId) -> myVmServiceWrapper.getScriptSync(isolateId, scriptId);
    mapper.onConnect(provider, myConnector.getRemoteBaseUrl());
    // We disable the remote debug flag so that handleDebuggerConnected() does not echo the stdout and
    // stderr streams (this would duplicate what we get over daemon logging).
    remoteDebug = false;
    final FlutterLaunchMode launchMode = FlutterLaunchMode.getMode(executionEnvironment);
    if (launchMode.supportsDebugConnection()) {
        myVmServiceWrapper.handleDebuggerConnected();
    }
    // We re-enable the remote debug flag so that the service wrapper will call our guessRemoteProjectRoot()
    // method with the list of loaded libraries for the isolate.
    remoteDebug = true;
    vmService.addVmServiceListener(vmServiceListener);
    myVmOpenSourceLocationListener.addListener(this::onOpenSourceLocationRequest);
    myVmConnected = true;
    getSession().rebuildViews();
    onVmConnected(vmService);
}
Also used : java.util(java.util) VirtualFile(com.intellij.openapi.vfs.VirtualFile) ObservatoryConnector(com.jetbrains.lang.dart.ide.runner.ObservatoryConnector) DartVmServiceSuspendContext(com.jetbrains.lang.dart.ide.runner.server.vmService.frame.DartVmServiceSuspendContext) THashSet(gnu.trove.THashSet) FlutterLaunchMode(io.flutter.run.FlutterLaunchMode) org.dartlang.vm.service.element(org.dartlang.vm.service.element) XDebuggerEditorsProvider(com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider) GetObjectConsumer(org.dartlang.vm.service.consumer.GetObjectConsumer) XDebuggerBundle(com.intellij.xdebugger.XDebuggerBundle) ExecutionEnvironment(com.intellij.execution.runners.ExecutionEnvironment) XStackFrame(com.intellij.xdebugger.frame.XStackFrame) ConsoleViewContentType(com.intellij.execution.ui.ConsoleViewContentType) DartUrlResolver(com.jetbrains.lang.dart.util.DartUrlResolver) WindowListener(java.awt.event.WindowListener) ProjectUtil(com.intellij.ide.impl.ProjectUtil) Disposer(com.intellij.openapi.util.Disposer) Project(com.intellij.openapi.project.Project) ExecutionResult(com.intellij.execution.ExecutionResult) Logging(org.dartlang.vm.service.logging.Logging) OpenFileHyperlinkInfo(com.intellij.execution.filters.OpenFileHyperlinkInfo) Logger(com.intellij.openapi.diagnostic.Logger) XDebugSession(com.intellij.xdebugger.XDebugSession) XDebugSessionListener(com.intellij.xdebugger.XDebugSessionListener) XSuspendContext(com.intellij.xdebugger.frame.XSuspendContext) DartDebuggerEditorsProvider(com.jetbrains.lang.dart.ide.runner.base.DartDebuggerEditorsProvider) Frame(java.awt.Frame) WindowManager(com.intellij.openapi.wm.WindowManager) VmService(org.dartlang.vm.service.VmService) IOException(java.io.IOException) XBreakpointHandler(com.intellij.xdebugger.breakpoints.XBreakpointHandler) FlutterBundle(io.flutter.FlutterBundle) SystemInfo(com.intellij.openapi.util.SystemInfo) WindowEvent(java.awt.event.WindowEvent) StandardCharsets(java.nio.charset.StandardCharsets) java.awt(java.awt) Nullable(org.jetbrains.annotations.Nullable) XSourcePosition(com.intellij.xdebugger.XSourcePosition) TimeoutUtil(com.intellij.util.TimeoutUtil) DartVmServiceStackFrame(com.jetbrains.lang.dart.ide.runner.server.vmService.frame.DartVmServiceStackFrame) BitUtil(com.intellij.util.BitUtil) ApplicationManager(com.intellij.openapi.application.ApplicationManager) NotNull(org.jetbrains.annotations.NotNull) javax.swing(javax.swing) FlutterLaunchMode(io.flutter.run.FlutterLaunchMode)

Aggregations

ExecutionResult (com.intellij.execution.ExecutionResult)1 OpenFileHyperlinkInfo (com.intellij.execution.filters.OpenFileHyperlinkInfo)1 ExecutionEnvironment (com.intellij.execution.runners.ExecutionEnvironment)1 ConsoleViewContentType (com.intellij.execution.ui.ConsoleViewContentType)1 ProjectUtil (com.intellij.ide.impl.ProjectUtil)1 ApplicationManager (com.intellij.openapi.application.ApplicationManager)1 Logger (com.intellij.openapi.diagnostic.Logger)1 Project (com.intellij.openapi.project.Project)1 Disposer (com.intellij.openapi.util.Disposer)1 SystemInfo (com.intellij.openapi.util.SystemInfo)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 WindowManager (com.intellij.openapi.wm.WindowManager)1 BitUtil (com.intellij.util.BitUtil)1 TimeoutUtil (com.intellij.util.TimeoutUtil)1 XDebugSession (com.intellij.xdebugger.XDebugSession)1 XDebugSessionListener (com.intellij.xdebugger.XDebugSessionListener)1 XDebuggerBundle (com.intellij.xdebugger.XDebuggerBundle)1 XSourcePosition (com.intellij.xdebugger.XSourcePosition)1 XBreakpointHandler (com.intellij.xdebugger.breakpoints.XBreakpointHandler)1 XDebuggerEditorsProvider (com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider)1