Beispiel #1
0
 /// <summary>
 /// Sets the instance of currently running Visual Studio IDE.
 /// </summary>
 /// <param name="dte">The DTE.</param>
 internal static void SetDTE(DTE dte)
 {
     DTE = dte;
     if (dte != null)
     {
         debuggerEvents = DTE.Events.DebuggerEvents;
         debuggerEvents.OnEnterBreakMode  += DebuggerEvents_OnEnterBreakMode;
         debuggerEvents.OnEnterDesignMode += DebuggerEvents_OnEnterDesignMode;
         debuggerEvents.OnEnterRunMode    += DebuggerEvents_OnEnterRunMode;
         debuggerProxy = (VSDebuggerProxy)AppDomain.CurrentDomain.GetData(VSDebuggerProxy.AppDomainDataName) ?? new VSDebuggerProxy();
         VSDebugger    = new VSDebugger(debuggerProxy);
         Engine.Context.InitializeDebugger(VSDebugger, new DiaSymbolProvider());
     }
     else
     {
         // 90s all over again :)
         var timer = new System.Windows.Threading.DispatcherTimer();
         timer.Tick += (a, b) =>
         {
             timer.Stop();
             if (DTE == null)
             {
                 InitializeDTE();
             }
         };
         timer.Interval = TimeSpan.FromSeconds(0.1);
         timer.Start();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VSDebugger"/> class.
 /// </summary>
 /// <param name="proxy">The Visual Studio debugger proxy running in Default AppDomain.</param>
 public VSDebugger(VSDebuggerProxy proxy)
 {
     Proxy = proxy;
     Context.SetUserTypeMetadata(ScriptCompiler.ExtractMetadata(new[]
     {
         typeof(CsDebugScript.CommonUserTypes.NativeTypes.cv.Mat).Assembly,     // CsDebugScript.CommonUserTypes.dll
     }));
 }
Beispiel #3
0
 /// <summary>
 /// Sets the instance of currently running Visual Studio IDE.
 /// </summary>
 /// <param name="dte">The DTE.</param>
 internal static void SetDTE(DTE dte)
 {
     DTE            = dte;
     debuggerEvents = DTE.Events.DebuggerEvents;
     debuggerEvents.OnEnterBreakMode  += DebuggerEvents_OnEnterBreakMode;
     debuggerEvents.OnEnterDesignMode += DebuggerEvents_OnEnterDesignMode;
     debuggerEvents.OnEnterRunMode    += DebuggerEvents_OnEnterRunMode;
     debuggerProxy = (VSDebuggerProxy)AppDomain.CurrentDomain.GetData(VSDebuggerProxy.AppDomainDataName) ?? new VSDebuggerProxy();
     VSDebugger    = new VSDebugger(debuggerProxy);
     Engine.Context.InitializeDebugger(VSDebugger);
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RegisterAccess"/> class.
 /// </summary>
 /// <param name="threadId">Thread identifier.</param>
 /// <param name="frameId">Stack frame identifier.</param>
 /// <param name="proxy">VS debugger proxy.</param>
 public RegistersAccess(uint threadId, uint frameId, VSDebuggerProxy proxy)
 {
     this.threadId = threadId;
     this.frameId  = frameId;
     this.proxy    = proxy;
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VSDebugger"/> class.
 /// </summary>
 /// <param name="proxy">The Visual Studio debugger proxy running in Default AppDomain.</param>
 public VSDebugger(VSDebuggerProxy proxy)
 {
     this.proxy = proxy;
 }