title: How to debug VisualStateManager in runtime
body: <p>There are very helpful tools out there to debug WPF applications in run-time like <a href="http://snoopwpf.codeplex.com" rel="nofollow noreferrer"><strong>Snoop</strong></a>, <a href="https://wpfinspector.codeplex.com/" rel="nofollow noreferrer"><strong>WPF Inspector</strong></a> and <a href="http://xamlspy.com" rel="nofollow noreferrer"><strong>Xaml Spy</strong></a> which allow you to sneak peek into running application and monitor property values, DataContext changes, routing events and even triggers switching.</p>
  
  <p>But what I did not managed to find in any of them is the way how to <strong>monitor VisualStateManager (VSM) transitions between states</strong> on particular selected control in run-time.</p>
  
  <p>Is there any tool that could help with figuring out why a control doesn't go into the particular expected state (considering absence of source code for this application/library)?</p>
  
  <p><strong>Update:</strong> The question is mostly about debugging <em>compiled code</em>, when you have <em>no</em> access to the source. For cases when you <em>have</em> access to source code <a href="https://stackoverflow.com/questions/6002046/binding-visualstatemanager-view-state-to-a-mvvm-viewmodel?rq=1">here is pretty good explanation</a> of one of the ways to go.</p>