Solved

Can't hit breakpoint using VS2010

Posted on 2010-08-22
15
1,422 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 2
  • +1
15 Comments
 
LVL 9

Expert Comment

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

Author Comment

by:chilliconcarne
ID: 33497854
That isn't helpful.
0
 
LVL 17

Expert Comment

by:Zhaolai
ID: 33497913
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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

Author Comment

by:chilliconcarne
ID: 33497966
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
ID: 33497979
Can you hit a breakpoint if you create a new project?
0
 

Author Comment

by:chilliconcarne
ID: 33498014
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
ID: 33498065
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
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33498077
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
ID: 33505917
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
ID: 33507050
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
ID: 33507459
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
ID: 33508039
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
ID: 33526670
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
ID: 33527552
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
ID: 33592507
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

710 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