示例#1
0
        private bool OpenSolutionResource(SolutionFile sr, string editor)
        {
            if (sr == null)
            {
                return(false);
            }
            if (string.IsNullOrEmpty(sr.FilePath))
            {
                return(false);
            }
            IVsCommandWindow cmw = (IVsCommandWindow)GetService(typeof(SVsCommandWindow));

            if (cmw == null)
            {
                return(false);
            }

            if (editor == null)
            {
                cmw.ExecuteCommand("of \"" + sr.FilePath + "\"");
            }
            else if (editor.Length == 0)
            {
                cmw.ExecuteCommand("of \"" + sr.FilePath + "\" /editor");
            }
            else
            {
                cmw.ExecuteCommand("of \"" + sr.FilePath + "\" /e:\"" + editor + "\"");
            }

            return(true);
        }
示例#2
0
        public override async Task LaunchAsync(DebugLaunchOptions launchOptions)
        {
            await base.LaunchAsync(launchOptions);

            IVsCommandWindow commandWnd = (IVsCommandWindow)ServiceProvider.GetService(typeof(SVsCommandWindow));

            commandWnd.ExecuteCommand("Tools.Alias gdb Debug.VRDebugExec");
        }
示例#3
0
        public void Launch(string path, string args, string workingDir)
        {
            PipeLaunchOptions  options = BuildLaunchOptions(path, args, workingDir);
            VsDebugTargetInfo4 target  = new VsDebugTargetInfo4
            {
                dlo     = (uint)DEBUG_LAUNCH_OPERATION.DLO_CreateProcess,
                bstrExe = path,
                guidLaunchDebugEngine = new Guid(EngineConstants.EngineId),
                bstrOptions           = ToXmlString(options)
            };

            env.LaunchVsDebugger(target);
            IVsCommandWindow commandWnd = env.GetService <SVsCommandWindow, IVsCommandWindow>();

            commandWnd.ExecuteCommand("Tools.Alias gdb Debug.VRDebugExec");
        }