In VS 2005, you might bump into a problem where you won't be able to debug your web application.
Your break point won't hit, even if your are able to attach debugger to the worker process.
Following is a resolution for such problem
Well, i don't guarantee it will work for you. But it worked for me...
Hope this helps in case you get stuck in this problem.Recently I faced a (weird) problem.
Your break point won't hit, even if your are able to attach debugger to the worker process.
Following is a resolution for such problem
Well, i don't guarantee it will work for you. But it worked for me...
Hope this helps in case you get stuck in this problem.Recently I faced a (weird) problem.
Weird because , I had to spent too much time on this simple and innocent looking problem than I expected.
See below fig.
I was not able to debug any code in my web app. Breakpoint were not getting hit.
I am using Windows 7, IIS 7, Visual Studio 2005, .Net Framework 2.0. Application pool type Classic for this web app.
The first thing I did was delete temporary files in C:\Windows\Microsoft.NET\ Framework\v2.0.50727\Temporary ASP.NET Files.And thought it would work .. but it didn’t. L
Then I started searching for the solution and came across few solutions that might help you in case you get stuck up in this thing.Now, I am not expert on this matter, whatever I have mentioned is just my observation and opinion, and I am pretty sure it will help, also would appreciate if you can help to put more light on this issue.
Reason: I found for this:
· .pdb files, that generates symbols for breakpoints and other debugging info are either not generated or deleted after generation by devenv.
· That might be because you have selected “Release” in solution configuration. Or in web.config <compilation debug="false"> is false.
· Or in Machin.config , deployment retail is true,
<configuration>
<system.web>
<deployment retail=”true”/>
</system.web>
</configuration>
This implies that on your server you don’t want debugging stuff to be generated as you intend your server to be just a production server.
Actually while using Windows XP and VS 2005, by making this change in machine.config debugging started working, but in Windows 7 it didn’t
don’t know why..!
· Timestamp for pdb and dll files in your actual source might be different.
Solving it
· In machine.config file add <deployment retail=”false”/> in <system.web> </system.web>
· In web.config add <compilation debug="true">
· Clean your solution and/or delete temporary files
· Build whole solution.
· In properties of solution ->Build tab-> Configuration should be “Debug”.
Once done check output window in VS 2005 :
It should work just fine.
If you see anything like this output window in VS 2005 :
Then it is a problem again. You’ll have to delete temporary files, check timestamp of.pdb and corresponding .dll’s.
And build again.
Point to Remember : If your Page/component/Module does not generate pdb file after build or your web page does not have .pdb file generated in temporary files
You won’t be able to debug. So First thing you should do is select configuration as “Debug” for solution. Delete temporary files if any. Build solution again. You’ll
probably get your pdb files then.
Well, if I have mentioned something wrong or missed something here. Please do share with me if you have any info about this issue. Would appreciate that. J
0 comments:
Post a Comment