title: Debugging Web Project w/ Visual Studio Code + ASP.NET 5 + Mono + Kestrel + OS X
body: <p>I'm pretty new to OS X (4 days with my new mac), and I am working on setting up an environment where I can debug my Asp.Net 5 web project locally with the debugger built into Visual Studio Code, specifically getting the breakpoint to work when attaching to mono.</p>
  
  <p>I followed these instructions for installing asp.net 5 and visual studio code. (<a href="http://docs.asp.net/en/latest/getting-started/installing-on-mac.html" rel="nofollow">http://docs.asp.net/en/latest/getting-started/installing-on-mac.html</a>)</p>
  
  <p>I then installed yeoman, and scaffolded out an aspnet project.</p>
  
  <p>I ran commands <code>dnu restore</code>, <code>dnu build</code>, and <code>dnx web</code>.</p>
  
  <p>The project runs locally on Kestrel at localhost:5000 just fine. I can also attach it to mono via the VS Code debugger.</p>
  
  <p>The issue arises when I try to set breakpoints in the C# code. The debugger will not hit them.</p>
  
  <p>After doing some research I found that I needed to specify the Startup.cs file to mono as the one to debug. (<a href="https://code.visualstudio.com/Docs/editor/debugging" rel="nofollow">https://code.visualstudio.com/Docs/editor/debugging</a>)</p>
  
  <p>But after running <code>mcs -debug Startup.cs</code>, I get these errors:</p>
  
  <pre><code>Startup.cs(5,17): error CS0234: The type or namespace name `AspNet'     does not exist in the namespace `Microsoft'. Are you missing an assembly  reference?
  Startup.cs(6,17): error CS0234: The type or namespace name `AspNet' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
  Startup.cs(7,17): error CS0234: The type or namespace name `AspNet' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
  Startup.cs(8,17): error CS0234: The type or namespace name `Data' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
  Startup.cs(9,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
  Startup.cs(10,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
  Startup.cs(11,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
  Startup.cs(12,17): error CS0234: The type or namespace name `Extensions' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
  Startup.cs(13,16): error CS0234: The type or namespace name `Models' does not exist in the namespace `palmtree'. Are you missing an assembly reference?
  Startup.cs(14,16): error CS0234: The type or namespace name `Services' does not exist in the namespace `palmtree'. Are you missing an assembly reference?
  Startup.cs(20,24): error CS0246: The type or namespace name `IHostingEnvironment' could not be found. Are you missing an assembly reference?
  Startup.cs(20,49): error CS0246: The type or namespace name `IApplicationEnvironment' could not be found. Are you missing an assembly reference?
  Startup.cs(39,16): error CS0246: The type or namespace name `IConfigurationRoot' could not be found. Are you missing an assembly reference?
  Startup.cs(42,39): error CS0246: The type or namespace name `IServiceCollection' could not be found. Are you missing an assembly reference?
  Startup.cs(62,31): error CS0246: The type or namespace name `IApplicationBuilder' could not be found. Are you missing an assembly reference?
  Startup.cs(62,56): error CS0246: The type or namespace name `IHostingEnvironment' could not be found. Are you missing an assembly reference?
  Startup.cs(62,81): error CS0246: The type or namespace name `ILoggerFactory' could not be found. Are you missing an assembly reference?
  </code></pre>
  
  <p>It looks like mono cannot debug compile the Startup.cs properly. Is anyone else getting this error when trying to set up debugging? Or does anyone have breakpoints working with mono, asp.net 5, kestrel, vs code, and OS X?</p>