views:

153

answers:

4

I am working on an ASP.NET project and I cannot make the breakpoints work! The project does not stop where I place a breakpoint. It does not seem to matter where I place the breakpoint.

I am in debug mode; I am using IE 8, Windows 7 OS;

Has anyone ever had this problem?

A: 

is Debug set to true in the web.config as well as the build mode?

<compilation debug="true">
Glennular
yes, debug is set to true;
user279521
A: 

If you are using IE8 then you need to follow these settings

On registery HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main

Put Value: DWORD TabProcGrowth Value 0

Lalit
afraid to modify the registry;
user279521
are you using IE8 ?Because in that case, the default feature of IE8 LCIE doesn't allow you to debug.Just need to change the value, i have tried it, it works fine.
Lalit
yes I am using IE 8, but why would the browser be a factor?
user279521
Try it, this will solve the issue.
Lalit
I don't have access to modify the registry;
user279521
+1  A: 

Did You: 1) Run the program in debug mode such that VS auto-attaches to the process as it loads? or

2) Attach manually to the ASP.NET worker process that is already running via Debug..Attach to Process ?

3) Did you set debug="true" in the <compilation> element of the web.config, ie: <compilation defaultLanguage="c#" debug="true">

4) If it is a client-side jscript breakpoint, did you enable script debugging in Tools..Internet Options..Advanced..uncheck both of the "Disabled Script Debugging" checkboxes ?

Post the answers to these and then can follow up with more help

David
I am in debug mode;How do I attach manually to the asp.net worker process?
user279521
Menu: Debug..Attach to Process...Then look for the worker process in the list, on XP it is named aspnet_wp.exe, on later OS with IIS6+, the process is named w3wp.exe. Make sure when you highlight the process that "Managed code" appears in the "Attach to:" box just above the process list. Then click the Attach button.
David
The comment I just posted for attaching only works if you are using IIS, if you are using the local auto-dev web server, then it should be auto attaching when you do Debug..Start Debugging or F5 to run the web app.
David
@David, thats my concern, I am using localhost, and it shouldnt be this complicated to run debug locally; I am also on Windows 7 OS;
user279521
can you confirm if you are trying to debug server sides asp.net code or client-side javascript code?
David
I am trying to debug codebehind (C#);
user279521
+1  A: 

From my experience, BEFORE you hit F5 to debug, do a BUILD & and ReBuild. Then hit F5 and that should work (9 out of 10 times) !!

HTH

DotNetRookie