Ejemplo n.º 1
0
        private static string ExtractException2(IDebugStackFrame3 fr, int unused)
        {
            IEnumDebugPropertyInfo2 property;
            uint fetched;

            fr.EnumProperties(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_TYPE | enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_NAME, 10,
                              ref DebugFilterGuids.guidFilterAutoRegisters, int.MaxValue, out fetched, out property);
            if (fetched > 0)
            {
                uint count;
                property.GetCount(out count);
                var  propertyInfo = new DEBUG_PROPERTY_INFO[1];;
                uint celFetched;
                while (property.Next(1, propertyInfo, out celFetched) == VSConstants.S_OK && celFetched > 0)
                {
                    if (propertyInfo[0].bstrType.Contains("Exception"))
                    {
                        return(ExtractException(fr, propertyInfo[0].bstrName));
                    }
                }
            }
            return(null);
        }
Ejemplo n.º 2
0
        private static string ExtractException2(IDebugStackFrame3 fr,int unused)
        {
            IEnumDebugPropertyInfo2 property;
            uint fetched;

            fr.EnumProperties(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_TYPE | enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_NAME, 10,
                    ref DebugFilterGuids.guidFilterAutoRegisters, int.MaxValue, out fetched, out property);
            if (fetched > 0)
            {
                uint count;
                property.GetCount(out count);
                var propertyInfo = new DEBUG_PROPERTY_INFO[1];;
                uint celFetched;
                while (property.Next(1, propertyInfo, out celFetched) == VSConstants.S_OK && celFetched > 0)
                {
                    if (propertyInfo[0].bstrType.Contains("Exception"))
                    {
                        return ExtractException(fr, propertyInfo[0].bstrName);
                    }
                }
            }
            return null;
        }