Skip to content

Debug visualizer does not expand nested runtime class properties - VS2019/VS2022 regression #1121

@Scottj1s

Description

@Scottj1s

When the debug visualizer was first released with VS2017, it would expand nested runtime class properties. With VS2019/VS2022, this functionality no longer works.

Repro:

  1. Install the C++/WinRT VS extension in VS 2019 or VS 2022 (despite the name, it supports both).
  2. Create a simple C++/WinRT console app from the extension template, and add a query parameter to the uri:
#include "pch.h"

using namespace winrt;
using namespace Windows::Foundation;

int main()
{
    init_apartment();
    Uri uri(L"http://aka.ms/cppwinrt?foo=bar");
    printf("Hello, %ls!\n", uri.AbsoluteUri().c_str());
}

  1. Set a BP on the printf
  2. Build and F5 to debug
  3. In a watch window, type "uri"
  4. Expand the visualization for uri
  5. Expand the nested visualization for the QueryParsed property

Expected results:
The QueryParsed.Size property should be displayed, with value '1'

Actual results:
No expansion of QueryParsed occurs.

Notes:

In debugging the app with VS2017, the expansion results in BPs on both cppwinrt_visualizer::GetChildren and cppwinrt_visualizer::GetItems being hit. But with VS2019/VS2022, only cppwinrt_visualizer::GetChildren gets called - cppwinrt_visualizer::GetItems is never called and no child items (properties) are displayed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions