Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Live Visual Tree and Live Property Explorer in Visual Studio

Tags:

I'm running a .Net 4.5 WPF application in Visual Studio 2015 Update 1 in a Debug build configuration.

In Tools > Options > Debugging > General I have checked Enable UI Debugging Toos for XAML and Preview selected elements in Live Visual Tree.

However, when I run my application, both the Live Property Explorer and Live Visual Tree Windows display the following message.

UI Debugging is either disabled, not supported by the current application or the application execution is paused.

What am I missing?

like image 462
bkstill Avatar asked Feb 01 '16 12:02

bkstill


People also ask

How do I enable live visual tree?

You can enable this mode when you select the leftmost button on the Live Visual Tree toolbar. With this mode on, you can select a UI element in the application, and the Live Visual Tree automatically updates to show the node in the tree corresponding to that element, and its properties.

What is live visual tree?

You can get a real-time view of your running XAML code with the Live Visual Tree and the Live Property Explorer. These tools give you a tree view of the UI elements of your running XAML application, and show you the runtime properties of any UI element you select.

How do I Debug XAML code in Visual Studio?

To debug workflow XAMLOpen a workflow or activity project in Visual Studio. Set a breakpoint on the activity or activities you want to debug as described in How to: Set Breakpoints in Workflows. Right-click the . xaml file that contains your workflow definition and select View Code.


2 Answers

I had the same issue and resolved it by also selecting the "Preview selected elements in Live Visual Tree" sub-option (i.e. under Tools > Options > Debugging > General > Enable UI Debugging Toos for XAML). Whenever I unchecked that option, the Live Property Explorer and Live Visual Tree windows would go back to showing the "UI Debugging is either disabled..." message again.

like image 99
Chris Staley Avatar answered Sep 24 '22 22:09

Chris Staley


Steps can be seen below, it works well for me.

Open VS, then type "Enable UI Debugging Tools for XAML" in the Quick Lanch box, enter to go to setting detail page (see screenshot below).

  • Uncheck "Use Managed Compatibility Mode"
  • Check "Enable UI Debugging Tools for XAML" and its sub options

related_screenShot

You can refer from Microsoft:

How to: Display WPF Trace Information - Visual Studio | Microsoft Docs

like image 21
Bravo Yeung Avatar answered Sep 24 '22 22:09

Bravo Yeung