Solved

Can't hit breakpoint using VS2010

Posted on 2010-08-22
15
1,406 Views
Last Modified: 2012-05-10
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?
0
Comment
Question by:chilliconcarne
  • 7
  • 5
  • 2
  • +1
15 Comments
 
LVL 8

Expert Comment

by:Subrat (C++ windows/Linux)
Comment Utility
use F5 not F7/ ctr+Alt+F7
0
 

Author Comment

by:chilliconcarne
Comment Utility
That isn't helpful.
0
 
LVL 17

Expert Comment

by:Zhaolai
Comment Utility
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
 

Author Comment

by:chilliconcarne
Comment Utility
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
 
LVL 17

Expert Comment

by:Zhaolai
Comment Utility
Can you hit a breakpoint if you create a new project?
0
 

Author Comment

by:chilliconcarne
Comment Utility
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
 
LVL 16

Expert Comment

by:Vikram Singh Saini
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 16

Expert Comment

by:Vikram Singh Saini
Comment Utility
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
 

Author Comment

by:chilliconcarne
Comment Utility
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
 
LVL 16

Expert Comment

by:Vikram Singh Saini
Comment Utility
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
 

Author Comment

by:chilliconcarne
Comment Utility
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
 
LVL 16

Expert Comment

by:Vikram Singh Saini
Comment Utility
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
 

Author Comment

by:chilliconcarne
Comment Utility
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
 
LVL 16

Expert Comment

by:Vikram Singh Saini
Comment Utility
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
 

Accepted Solution

by:
chilliconcarne earned 0 total points
Comment Utility
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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now