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);
}
Aggregations