Reputation: 204924
I want to debug a ASP.NET application (Custom IHttpHandler) with Visual Studio 2008 and IIS7.
I compile the source, start debugging (F5) and IE loads. But my breakpoint (in method ProcessRequest()) is disabled. I get the error:
The breakpoint will not currently be hit. No symbols have been loaded for this document.
I have no idea about ASP.NET programming. Do i have to set anything in IIS?
The PDB files are there. I wanted to check the symbol load status of my DLL but I couldn't find it.
When I open "Debug->Windows->Modules" I can't see my DLL in the list.
Only Windows DLLs and assemlies from GAC and so on.
Am I missing something?
Upvotes: 2
Views: 5897
Reputation: 335
For the archive: a breakpoint is only activated, once the corresponding assembly was loaded in the process space. So in order to enable a breakpoint which was set on a code line inside a DLL, you must run your app to the place, where the DLL is loaded. The breakpoint will than get recognized by the debugger and ungrayed in VS.
Upvotes: 3
Reputation: 204924
Solved it.
I had to open a page with an specific file ending while debugging. As soon as I opened the right page my DDL loaded and the breakpoint activated.
Upvotes: 1
Reputation: 33300
The problem for me turned out to be that the Properties->Build->Optimize code checkbox had been turned on in the Debug configuration. Turned it off, rebuilt, and debugging worked as normal.
Upvotes: 2
Reputation: 6972
Have you registered the HttpHandler in the <system.web>
section instead of <system.webServer>
?
In web.config
:
<system.web>
...
<httpHandlers>
<add verb="GET" path="MyHandler.ashx" type="MyHandler, MyAssembly" />
...
</httpHandlers>
</system.web>
Upvotes: 1
Reputation: 8211
Visual Studio -> Debug -> Attach to process
w3wp.exe
More info here: http://www.codeproject.com/KB/aspnet/ProcessAttache.aspx
Upvotes: 3