| | |
| | | using System.Threading.Tasks;
|
| | | using Microsoft.VisualStudio;
|
| | | using Microsoft.VisualStudio.Debugger.Interop;
|
| | | using Microsoft.VisualStudio.Threading;
|
| | |
|
| | | namespace QtVsTools.Qml.Debug.AD7
|
| | | {
|
| | |
| | | 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,
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | |
| | | 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
|
| | |
| | | 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 /////////////////////////////////////////////////////////
|