Beispiel #1
0
            public ContextValidation(string debuggerPathX86,
                                     string debuggerPathAmd64,
                                     string debuggerPathVisualStudio,
                                     DefaultDebugger defaultDebugger,
                                     bool is64,
                                     bool diagnosticLogEnabled,
                                     string serviceHost,
                                     int servicePort,
                                     int eventsPerPage)
            {
                this.DebuggerPathX86          = debuggerPathX86;
                this.DebuggerPathAmd64        = debuggerPathAmd64;
                this.DebuggerPathVisualStudio = debuggerPathVisualStudio;
                this.DefaultDebugger          = defaultDebugger;
                this.DiagnosticLogEnabled     = diagnosticLogEnabled;
                _is64              = is64;
                this.ServiceHost   = serviceHost;
                this.ServicePort   = servicePort;
                this.EventsPerPage = eventsPerPage;

                this.Debuggers = DefaultDebuggerItem.GetList();

                foreach (DefaultDebuggerItem debugger in this.Debuggers)
                {
                    if (debugger.DefaultDebugger == this.DefaultDebugger)
                    {
                        this.SelectedDebugger = debugger;
                        break;
                    }
                }
            }
Beispiel #2
0
        private string ExtractDefaultDebuggerPath()
        {
            string defaultDebuggerUpperCase = DefaultDebugger.ToUpperInvariant();
            int    pathEndIndex             = defaultDebuggerUpperCase.IndexOf(VSJitDebuggerFileName);

            if (pathEndIndex < 0)
            {
                pathEndIndex  = defaultDebuggerUpperCase.IndexOf(VS7JitFileName);
                pathEndIndex += VS7JitFileName.Length - 1;
            }
            else
            {
                pathEndIndex += VSJitDebuggerFileName.Length - 1;
            }

            int pathStartIndex = defaultDebuggerUpperCase.LastIndexOf('"', pathEndIndex);

            if (pathStartIndex < 0)
            {
                pathStartIndex = 0;
            }

            return(defaultDebuggerUpperCase.Substring(pathStartIndex, pathEndIndex + 1).Trim('"'));
        }
Beispiel #3
0
 public DefaultDebuggerItem(DefaultDebugger defaultDebugger, string debuggerName)
 {
     this.DefaultDebugger = defaultDebugger;
     this.DebuggerName    = debuggerName;
 }