Link to home
Start Free TrialLog in
Avatar of chilliconcarne
chilliconcarne

asked on

Can't hit breakpoint using VS2010

Hi
I have trouble to debug my project using VS2010. This project is convert from .Net 2.0 using VS2005 to .Net 3.5. The conversion has no trouble. The whole solution has 20 projects in it. I did clean up all the .pdb in each project, rebuild each project. I can see the timestamp of .pdb files is the newly built. When I first open the whole solution, I make a breakpoint in one of .aspx.vb file, run it, it hits the breakpoint, then I rebuild the project, it never hit the breakpoint again. It is very odd. I did the most I can find the solution as:
•      Clean all the projects
•      Close Visual studio
•      Reboot computer
•      Restart Visual studio, rebuild every project
Make me feel as this is a bug in VS2010, I have no trouble using VS2005 or VS2008. So far still not work, Can any guru help me about this?
Avatar of Subrat (C++ windows/Linux)
Subrat (C++ windows/Linux)
Flag of India image

use F5 not F7/ ctr+Alt+F7
Avatar of chilliconcarne
chilliconcarne

ASKER

That isn't helpful.
On the top center of your VS 2010 IDE, there is a combox box. If it shows "Release", change it to "Debug", and re-build your entire project. Then F5.
You mean in the configuration manager, there is the "Active solution configuration ", show "Debug" or "Release".
Yes, I always make sure it is under "Debug" mode. rebuild, still has same problem.
Can you hit a breakpoint if you create a new project?
I didn't create a new project, I just add a new .aspx page to the existing project, put the breakpoint in the code behide .vb Page_Load, still, hit the breakpoint first time you open the VS, but after all, never again.
Hi,

In addition to Zhaolai's solution I would suggest you to open the path C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files & delete all of the existing files here.

For more details about how to debug your application by VS 2010 and how to use breakpoint there refer to link:

(1)  http://www.codeproject.com/KB/cs/MasteringInDebugging.aspx
(2) http://weblogs.asp.net/scottgu/archive/2010/04/21/vs-2010-debugger-improvements-breakpoints-datatips-import-export.aspx

Regards,
VSS
Hi,

Since you mentioned that you are putting the breakpoint in the page load event. The first time you are able to hit breakpoint. It seems that you have put the breakpoint in the Page load code under the if block code as

if(!IsPostBack)
{
      Response.Write("Breakpoint is here"); //Your breakpoint here
}

However on second time (I am just assuming that you are not closing VS and trying to reload the same page again) you would not get the hit to that breakpoint because that code will not be executed.

Let us know if it is the scenario for which you are working or something else.

Regards,
VSS
HI vs00saini:
I have deleted all the files in C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files. Clean the projects, re-builded, the problem is still there.
I have made a few breakpoints in the page, not just in the Page_load, I put it on the button_click too, However, on second time,( I am not closing VS, just close IE browser, re-run the project), it won't hit any breakpoints.
Hi,

So after giving try to all of the possible solutions we can. I have some questions to ask you so that the last try for solution can be done again. However it seems to me that your symbol files are either being deleted or are somehow your Webapplication is modifying that file.

Q.1. Which OS you are working on?

Q.2. I want to have look on the Website page for which you are setting debugging and breakpoint?

Q.3. Which IE version are you using for testing of your web application?

As you asked earlier if it is bug or not then let me to make you know that I too converted VS 2005 website into VS 2010 website. And tested the same in IE 5.1 on XP SP3 and it is working fine.

Regards,
V.S.Saini
I use XP SP3, and IE 6.0. The webpage is too long 5000 more lines, I just attach the snapshot for you.
ImagesNET.doc
Hi,

After checking your screenshot attach I reached at conclusion that Script debugging of Application in Internet Explorer is disable.

So for that check link:
(1) http://blogs.msdn.com/b/ie/archive/2004/10/26/247912.aspx

(2) http://sixrevisions.com/javascript/javascript-debugging-techniques-in-ie-6/

(3) https://www.experts-exchange.com/questions/20900253/Microsoft-Script-Debugger-in-Internet-Explorer-6.html

Here at link mentioned:
When you’ve enabled Script Debugging ‘View->Script Debugger’ will now  be present to help you break into the debugger.

So I am assuming that ( I am still not getting why it runs first time and then not) it is the culprit (Disabled Script Debugging) that is creating problem. Try the links (very first one is best). And let me know the result back.

Regards,
V.S.Saini
No. This doesn't work even I turn on the script debugging. I install VS2008 in the same computer box, it work perfectly every time I hit the breakpoint. same environment, don't know why VS 2010 doean't work properly.
Hi,

Are you getting some sort of messages when compiler reaches breakpoint?

Such as:

(1) Breakpoint  will not currently be hit. No symbols loaded for this document.

Please check the link:
(1) http://social.msdn.microsoft.com/Forums/en/vsdebug/thread/b0b269db-e526-4c81-a04e-2139a1b2c5e1

(2)  Why Address Breakpoints Are Disabled On Restart

Regards,
VSS
ASKER CERTIFIED SOLUTION
Avatar of chilliconcarne
chilliconcarne

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial