title: C# Visual Studio Debugger UI behavior with lock
body: <p>I have a block of code in a lock:</p>
  
  <pre><code>lock (obj)
  {
    //...
  }
  </code></pre>
  
  <p>I also have a property that locks on that same object. Simple enough scenario. My question is, if I put a breakpoint inside my locked block of code, and then examine the property in the Visual Studio debugger, what will happen? Will the debugger deadlock until I continue executing after breakpoint (or kill visual studio/debugging)? Or will the debugger simply not show any data for the property (grabbing data in background thread from UI?)</p>
  
  <p>The reason I ask is I've got a property specifically (and only) for debugging purposes; I'm OK with it occasionally not showing data when this scenario happens, but having crashed the debugger (and visual studio) many a time with bad debugger attributes, I'd rather avoid code that could at some point hamper my debugging efforts when that's what I'm trying to aid to begin with!</p>
  
  <p>I plan on testing this at some point when I've got some more time, but was hoping for a quicker answer from someone who might know better.</p>