HtmlAgilityPack Debugging asks for source code

半城伤御伤魂 提交于 2019-12-11 12:49:18

问题


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."

What the heck is this, why I can not debug the HtmlAgilityPack related code.


回答1:


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.

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.




回答2:


Please try the following...

Visual Studio -> Debug -> Options -> Check both "Enable Just My Code" and "Warn if no user code on lunch (Managed Only)"

Options



来源:https://stackoverflow.com/questions/4558654/htmlagilitypack-debugging-asks-for-source-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!