我已经在项目的类库中添加了html敏捷包.每当我尝试调试 HtmlAgilityPack 特定代码时,它都会打开一个浏览窗口,询问 HtmlAgilityPack 源文件(例如HtmlDocument.cs),或者给出错误消息没有源文件".当前位置可用的代码."
I have added html agility pack to my class library in project. Whenever i try to debug the HtmlAgilityPack specific code it opens a browse window asking for a HtmlAgilityPack source file (for example HtmlDocument.cs) or gives the error "There is no source code available for the current location."
这到底是什么,为什么我不能调试与HtmlAgilityPack相关的代码.
What the heck is this, why I can not debug the HtmlAgilityPack related code.
推荐答案当您在项目中包含DLL并进入代码时,由于DLL不包含源代码,因此无法向您显示源视图-仅编译的字节码.如果要调试,则必须告诉Visual Studio源代码在哪里,然后首先下载源代码.
When you include a DLL in your project and step into the code it is not possible to show you a source view because a DLL does not include the source code - only the compiled byte code. If you want to debug you have to tell Visual Studio where the source code is, and to do that you need to download it first.
或者,您可以只安装 .NET Reflector Pro 插件(不是免费的,但您可以免费试用),并使其自动反汇编程序集,并允许您进入反编译的代码.如果您使用的第三方产品的源代码不可用,这也很有用.
Alternatively you can just install the .NET Reflector Pro plugin (not free but you can try it for free) and have it automatically decompile the assembly and allow you to step into the decompiled code. This can also be useful if you have a third party product for which the source code is not available.
更多推荐
HtmlAgilityPack调试要求提供源代码
发布评论