Solved

Can't hit breakpoint using VS2010

Posted on 2010-08-22
15
1,428 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

626 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