title: Debugging TFS workflow with Visual Studio
body: <p>I am attempting to step through a TFS workflow build process using visual studio. I have followed numerous guilds on how to set this up. I have attempted this with remote debugging and local debugging on TFS 2010, TFS 2012, and TFS 2013. Each of them fail to hit the breaks points set in the workflow (using their respective workflows and visual studio editions). </p>
  
  <p>Currently in TFS 2013 workflow the debug output is spamming the following (repeated about 100+ times);</p>
  
  <pre><code>A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll  
  </code></pre>
  
  <p>Debug symbols are being loaded;</p>
  
  <pre><code>TFSBuildServiceHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Symbols loaded.
  </code></pre>
  
  <p>Also on every other run I get the following written to debug:</p>
  
  <pre><code>Step into: Stepping over method without symbols 'System.Threading.ExecutionContext.RunInternal'
  </code></pre>
  
  <p>The symbols for this are not listed as being loaded. </p>
  
  <p>As listed in the guide on <a href="http://blogs.microsoft.co.il/baruchf/2009/07/02/debugging-team-build-now-you-can/" rel="nofollow">how to setup TFS workflow debugging</a> I am attaching the debugger to the TFSBuildServiceHost.exe process. In local and remote this build agent is linked to the same TFS server. I then run the build and no break points are hit. </p>
  
  <p>I have also setup the visual studio debugger to load symbols form the microsoft symbols server and store them in a local directory. </p>
  
  <p>What is the definitive way to debug TFS workflows through visual studio?</p>