我是OS X的新手(使用我的新mac 4天了),我正在设置一个环境,我可以使用Visual Studio Code中内置的调试器在本地调试我的Asp.Net 5 Web项目,特别是获取附加到单声道时断点工作.
我按照这些说明安装了asp.net 5和visual studio代码.(http://docs.asp.net/en/latest/getting-started/installing-on-mac.html)
然后我安装了yeoman,并构建了一个aspnet项目.
我跑的命令dnu restore,dnu build和dnx web.
该项目在Kestrel本地运行localhost:5000就好了.我也可以通过VS Code调试器将它附加到mono.
当我尝试在C#代码中设置断点时出现问题.调试器不会命中它们.
在做了一些研究后,我发现我需要将Startup.cs文件指定为mono作为要调试的文件.(https://code.visualstudio.com/Docs/editor/debugging)
但运行后mcs -debug Startup.cs,我得到这些错误:
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 …Run Code Online (Sandbox Code Playgroud) macos mono visual-studio-code kestrel-http-server asp.net-core