Наша сборка Qt VS Tools
giy
2022-09-02 ca47896204482bf4a6979e3838bf7f09f61cebeb
QtVsTools.Package/QML/Debugging/AD7/QmlDebugAD7StackFrame.cs
@@ -32,6 +32,7 @@
using System.Threading.Tasks;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Debugger.Interop;
using Microsoft.VisualStudio.Threading;
namespace QtVsTools.Qml.Debug.AD7
{
@@ -52,14 +53,14 @@
        public Program Program { get; private set; }
        public CodeContext Context { get; private set; }
        public Dictionary<int, Dictionary<string, Property>> Properties { get; private set; }
        private Dictionary<int, Dictionary<string, Property>> Properties { get; set; }
        public string Name { get; private set; }
        public int FrameNumber { get; private set; }
        public IEnumerable<int> Scopes { get; private set; }
        public Task InitThread { get; private set; }
        private string Name { get; set; }
        public int FrameNumber { get; set; }
        private IEnumerable<int> Scopes { get; set; }
        private JoinableTask InitThread { get; set; }
        static public StackFrame Create(
        public static StackFrame Create(
            string name,
            int number,
            IEnumerable<int> scopes,
@@ -85,7 +86,11 @@
            Name = string.Format("{0}@{1}:{2}", name, context.FilePath, context.FileLine + 1);
            FrameNumber = number;
            Scopes = scopes;
            InitThread = Task.Run(() => InitializeProperties());
            InitThread = QtVsToolsPackage.Instance.JoinableTaskFactory.RunAsync(async () =>
            {
                InitializeProperties();
                await Task.Yield();
            });
            return true;
        }
@@ -134,7 +139,7 @@
            if (guidFilter != Guid.Empty && !Property.Filter.LocalsSelected(ref guidFilter))
                return VSConstants.S_OK;
            InitThread.Wait();
            InitThread.Join();
            pcelt = 0;
            ppEnum = PropertyEnum.Create(Properties
                .SelectMany(x => x.Value
@@ -152,9 +157,8 @@
            uint dwTimeout,
            out IEnumDebugPropertyInfo2 ppEnum)
        {
            uint pcelt;
            return ((IDebugStackFrame2)this)
                .EnumProperties(dwFields, dwRadix, guidFilter, dwTimeout, out pcelt, out ppEnum);
                .EnumProperties(dwFields, dwRadix, guidFilter, dwTimeout, out _, out ppEnum);
        }
        #region //////////////////// Info /////////////////////////////////////////////////////////