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?
chilliconcarneAsked:
Who is Participating?
 
chilliconcarneConnect With a Mentor Author Commented:
I did find out some solutions for this problem. One is before build, stop the VS development server. Another is set up my web project in specific port instead of auto-assign port. I think this problem is something to do with webdev.webserver.exe, but it is beyond my acknowledge.
0
 
Subrat (C++ windows/Linux)Software EngineerCommented:
use F5 not F7/ ctr+Alt+F7
0
 
chilliconcarneAuthor Commented:
That isn't helpful.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
ZhaolaiCommented:
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.
0
 
chilliconcarneAuthor Commented:
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.
0
 
ZhaolaiCommented:
Can you hit a breakpoint if you create a new project?
0
 
chilliconcarneAuthor Commented:
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.
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
0
 
chilliconcarneAuthor Commented:
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.
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
0
 
chilliconcarneAuthor Commented:
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
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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) http://www.experts-exchange.com/Software/Internet_Email/Web_Browsers/Q_20900253.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
0
 
chilliconcarneAuthor Commented:
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.
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.