コード例 #1
0
 public int OnCustomDebugEvent(ref Guid ProcessId, VsComponentMessage message) {
     switch ((VsPackageMessage)message.MessageCode) {
         case VsPackageMessage.WarnAboutPythonSymbols:
             WarnAboutPythonSymbols((string)message.Parameter1);
             return VSConstants.S_OK;
         case VsPackageMessage.WarnAboutPGO:
             WarnAboutPGO((string)message.Parameter1);
             return VSConstants.S_OK;
         case VsPackageMessage.SetDebugOptions:
             SetDebugOptions((IDebugEngine2)message.Parameter1);
             return VSConstants.S_OK;
         default:
             return VSConstants.S_OK;
     }
 }
コード例 #2
0
 public int OnCustomDebugEvent(ref Guid ProcessId, VsComponentMessage message)
 {
     try {
     VsPackageMessage code = (VsPackageMessage)message.MessageCode;
     switch (code) {
       case VsPackageMessage.AttachToChild:
     int parentId = (int)message.Parameter1;
     int childId = (int)message.Parameter2;
     Process proc = Process.GetProcessById(childId);
     if (proc != null)
       DebugAttach.AttachToProcess(new Process[] { proc }, ChildDebuggingMode.AlwaysAttach);
     break;
       case VsPackageMessage.IsChildDebuggingEnabled:
     Guid processGuid = (Guid)message.Parameter1;
     Guid connectionGuid = (Guid)message.Parameter2;
     DkmTransportConnection connection = DkmTransportConnection.FindConnection(connectionGuid);
     if (connection != null) {
       if (IsChildDebuggingEnabledByDefault) {
         DkmCustomMessage response = DkmCustomMessage.Create(
             connection,
             null,
             PackageServices.VsDebuggerMessageGuid,
             (int)VsDebuggerMessage.EnableChildProcessDebugging,
             processGuid,
             null
         );
         response.SendLower();
       } else {
         Logger.Log(
             "Not enabling child process debugging for process {0}.  " +
             "Child debugging is disabled by default.",
             processGuid);
       }
     }
     break;
     }
       } catch (Exception exception) {
     Logger.LogException(
     exception,
     "An error occured while handling a VsPackage message.  HR=0x{0:X}",
     exception.HResult);
       }
       return 0;
 }
コード例 #3
0
ファイル: AD7Events.cs プロジェクト: rajkumar42/MIEngine
        int IDebugCustomEvent110.GetCustomEventInfo(out Guid guidVSService, VsComponentMessage[] message)
        {
            guidVSService = _guidVSService;
            message[0].SourceId = _sourceId;
            message[0].MessageCode = (uint)_messageCode;
            message[0].Parameter1 = _parameter1;
            message[0].Parameter2 = _parameter2;

            return Constants.S_OK;
        }
コード例 #4
0
ファイル: AD7Events.cs プロジェクト: RussBaz/PTVS
 int IDebugCustomEvent110.GetCustomEventInfo(out Guid guidVSService, VsComponentMessage[] message) {
     guidVSService = Guids.CustomDebuggerEventHandlerGuid;
     message[0] = _message;
     return VSConstants.S_OK;
 }
コード例 #5
0
ファイル: AD7Events.cs プロジェクト: RussBaz/PTVS
 public AD7CustomEvent(VsComponentMessage message) {
     _message = message;
 }