Exemplo n.º 1
0
        public static DebugAdapterProcess Start(string launchJson)
        {
            var debugProcess = new DebugAdapterProcess();

            debugProcess.StartProcess(launchJson);
            return(debugProcess);
        }
Exemplo n.º 2
0
        public ITargetHostProcess LaunchAdapter(IAdapterLaunchInfo launchInfo, ITargetHostInterop targetInterop)
        {
            if (launchInfo.LaunchType == LaunchType.Attach)
            {
                var debugAttachInfo = (DebugAttachInfo)_debugInfo;
                return(DebugAdapterRemoteProcess.Attach(debugAttachInfo));
            }

            var debugLaunchInfo         = (DebugLaunchInfo)_debugInfo;
            var debugPyAdapterDirectory = Path.GetDirectoryName(PythonToolsInstallPath.GetFile("debugpy\\adapter\\__init__.py"));
            var targetProcess           = new DebugAdapterProcess(_adapterHostContext, targetInterop, debugPyAdapterDirectory);

            return(targetProcess.StartProcess(debugLaunchInfo.InterpreterPathAndArguments.FirstOrDefault(), debugLaunchInfo.LaunchWebPageUrl));
        }