MSDN > 論壇首頁 > Visual Studio Debugger > Single stepping gone crazy with VS2008 installation of SP1
發問發問
 

已答覆Single stepping gone crazy with VS2008 installation of SP1

  • Monday, 18 August, 2008 15:28Wacha 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Since I installed VS2008 SP1, single stepping through code does not work, misses break points and generally, it is unpredictable and unusable.  It will generally hit the first break point but after that it is totally unpredictable. 

    Any idea what needs to be done to correct this behavior ?  Is there any thing to do to correct this or is this installation of SP1 in need of a full removall ?

    Thank you for your help.

解答

所有回覆

  • Wednesday, 20 August, 2008 12:47TomasU 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I have the exact same problem. And so does several other people in my project.
    It always hits the first breakpoint, but after that you never know what happens. It might skip later breakpoints, sometime it doesn't. You might be able to step to the next row, sometimes you wont.
  • Friday, 22 August, 2008 17:29Jay Leiser 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I have the same problem, only after the install of Service Pack 1.

     I have a machine without the service pack and I can step into every method with F11.

    After the service pack it randomly ignores F10/F11 and breakpoints and just runs. 

    I had the same problem with the beta of service pack 1.
  • Saturday, 23 August, 2008 14:24wanne1979 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    We had the same problem after installing VS2008 SP1. All team members encountered the problem. We had to uninstall the SP.
    It seems that this problem is not documented on the ms connect site.
  • Saturday, 23 August, 2008 14:59Wacha 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Basically, I see on this groug that there seems to be a serious degradation in multiple cases of the debug environment after VS2008 SP1 installation.

    Since we simply can not live with this, are there any warnings about unstalling SP1 ?  I guess we will probably end up removing the entire VS2008 and reinstalling it.

    Would be great if MS could comment on all this.
  • Monday, 25 August, 2008 12:44Jay Leiser 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I have not found any comment from MS but I did uninstall the service pack from Add Remove Programs and now the debugging is back to normal.
  • Friday, 29 August, 2008 15:32Glacial 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Same issue, raised it in my own thread some time ago but with no awser as yet.

    http://forums.msdn.microsoft.com/en-US/vsdebug/thread/0555a254-235b-45c0-a898-fda6bb45a98b
  • Wednesday, 3 September, 2008 17:08Azeem Khan - MSFTMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi All,

    Apologies that no one has responded to this thread so far. The experiences mentioned here are unexpected.

    Are you folks sure that you are debugging the exact same project and configurations for VS 2008 and VS 2008 SP1. The descriptions provided for VS 2008 SP1 sound like you are debugging optimized code. If this is managed code we are talking about then JITer puts out far fewer noops and we end up with fewer stopping points. I fyou hover over the glyphs it may say things like no code out there etc.  Stepping may not work as expected since there are fewer stopping points.

    Could you tell me what message you see when you hover over the breakpoint glyphs and see if what the module window says about the module you are stepping through? Are symbols loaded? Is it optimized? Is this managed code or native?

    Azeem Khan
    VS Debugger.
  • Thursday, 4 September, 2008 20:25Jay Leiser 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi Azeem,

    I first would like to thank you for your response, this problem is preventing me from getting sql server 2008 since it requires sp1.

    I am debugging the exact same project and I have 2 machines one with sp1 and one without.
    The project is a cab c# winforms application. So far I have only seen this problem in one part of the code but it makes debugging a real problem. The code is just to add a ToolButton to an Infragistics ToolBarManager. Without the service pack you can step into/over put breakpoints and it will do what is expected. With SP1 it will randomly ignore breakpoints or if you are stepping through the code it will just start to run with no warning. it is not consistant and unpredictable.

    The breakpoint glyphs are fine and it will stop on some of the breakpoints. Just not all and not the same ones.

    I had the same problem with the beta of sp1, but I have reformated my harddrive and reinstalled since then.  There is no chance of left over bits from the beta being on my system.

    I hope you can find a solution for this,  until you do I am stuck with SQL2005.

    Jay Leiser
    Napco Programmer
  • Friday, 5 September, 2008 12:21Wacha 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    The same answer as Azeem,

    Exactly the same project, no change at all.  Glyphs are fine.  Same project on another "clean" Vs2008, no SP1 works fine.  The only thing that changed to provoque this situation is the application of SP1.  Il will try applying SP1 to another box and see if it does the same.

    There is something really weird about this!

  • Friday, 5 September, 2008 16:35Azeem Khan - MSFTMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi Jay/Wacha,

    So it appears that symbol loading is working and breakpoints are getting bound. Could you folks try disabling the option "Tools -> Options -> Debugging -> General -> Enable property evaluation and other implicit function calls" and see if things work better. Also when you do see random stepping behavior could you look at the debug pane in the Output window and let me know if you see something there. I am wondering if the thread is getting aborted etc.

    Azeem Khan
    VS Debugger.
  • Friday, 5 September, 2008 18:11Jay Leiser 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Azeem,

    I tried what you suggested, the disabling the option "Tools -> Options -> Debugging -> General -> Enable property evaluation and other implicit function calls" did not help. I did see these lines in the output window.

    The thread '<No Name>' (0xecc) has exited with code 0 (0x0).
    The thread '<No Name>' (0xb04) has exited with code 0 (0x0).

    Jay
  • Monday, 8 September, 2008 15:29Azeem Khan - MSFTMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Jay,

    To recap symbols are being loaded, code is not optimized, breakpoints are bound and no evaluations are being done but breakpoints are being missed randomly. I am not sure what could be causing this.
    If you could reduce this to a repro that you can provide here, I can take a look. Alternatively you can open a bug at http://connect.microsoft.com/VisualStudio with the details.

    Azeem Khan
    VS Debugger.
  • Friday, 12 September, 2008 17:43Gregg MiskellyMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    If anyone else is running into this and would like to help us track down the problem, we would appreciate it.

    To make progress on this, a few things would be helpful.
    #1: If you have a project that reliably reproduces this problem (not just one machine), and which is something that you can share with me, that would be ideal. If so, please send me an email (greggm on the microsoft.com email server) and we can take it from there. If your repro is not something that you can share, you might try creating a smaller project and copy code over in hopes of reproducing the problem there.

    #2: It would be good to try to determine if this is caused by a .NET Framework change or by a Visual Studio change. If you have another machine that you are thinking of installing SP1 on, please try first upgrading just the Framework and see if you can reproduce the problem before upgrading Visual Studio.

    #3: A text file of the IL and generated x86 code for a section that produces this problem may be helpful.
    - To get the x86: right click on a call stack frame and invoking the 'Go to disassembly' command
    - To get the IL: Start ildasm.exe (usually in c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\ildasm.exe). Open your dll or exe that you are having problems with. Check View->Show Source Lines. Double click on the function that the problem is happening in.

    Thanks,
    Gregg Miskelly
    Visual Studio Debugger Dev
  • Friday, 12 September, 2008 18:19Jay Leiser 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Gregg,

    I just sent you the dissassembly and IL that you requested and yes, both machines have the upgraded framework

    Jay
  • Monday, 15 September, 2008 16:09Filip Knutsson 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I have nothing further to add but to inform Microsoft that several members (most of us) of our development team experience the same problems. When stepping into/over/out VS2008 just interprets this as "run" and does not give a damn about whether I'd like to debug or just sit and watch while the program runs in debug mode =)

    I am also considering downgrading from SP1 to see if thing work out. As it is now it is impossible to debug anything. I have found that if stepping starts getting ignored totally, I can restart the VS and it will work for a while (a couple of "steps" at least, but it just keeps degrading the longer you go (is the impression I get)).

    I hope you fix this soon!

  • Monday, 15 September, 2008 18:51eheinz 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    Our development team is also having the same issues described in this post.  We are trying to debug a .NET remoting server which has multiple threads.  First breakpoint is consistently hit, but after that it is unpredictable.  I even tried freezing all other threads and had the same issues.

  • Tuesday, 16 September, 2008 17:51Habib Heydarian MSFTMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    All,

    We have identified the root cause of this issue and are currently working on a solution. We apologize for the inconvenience that this is causing you. We will let you know as soon as we have a solution. In the mean time, if we discover any workrounds, we will post them here.

    Thanks for your patience.

    Habib Heydarian (habibh@microsoft.com)
    Visual Studio Debugger Program Manager Lead
  • Thursday, 18 September, 2008 21:04Wacha 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Thank you every one for your input on this.  Now we know we were not dreaming this.

    For Habib,  I hope you come up with a solution ASAP otherwise we will have to remove VS 2008 SP1 from our environment.  This would be so much pain.

    Thanks again and find a solution FAST FAST FAST...

    Wacha
  • Friday, 19 September, 2008 7:59Hendrik Rachor 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi,

    since installing VS 2008 SP1 we have noticed this problem too :(

    Is there any schedule available when this problem will be fixed? It would ne nice to know if a fix or workaround will be available in a foreseeable amount of time or if we have to uninstall SP1 instead :(

    Greetings


  • Monday, 29 September, 2008 18:26Dave Lubash - MSFT版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    Sorry for the inconvenience, we made a late change to fix a different issue and introduced this bigger problem.   We are working on a solution for this that should be available *soon*.   We do need to ensure we have adequate testing on this fix, as it will need to be generally deployed.  We should have our planned release date for this locked down in the next few days, but I would expect this to be about two weeks out.


    Updated 9/30/2008 -- my estimate of two weeks was low.  Our target release time is now end of October.
     

    Thanks,

    Dave

  • Tuesday, 14 October, 2008 10:39JestriK 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I'm glad I'm not the only one experiencing this problem, it's been driving me mad for weeks.

    Is there a way to work around this in until the fix is ready? I have tried disabling the "Enable property evaluation and other implicit function calls" option but no luck unfortunatley.

    Best regards,
    James
  • Tuesday, 14 October, 2008 17:24Brad SullivanMSFT, 擁有者使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I put up an announcement in this forum for this issue.  I'll paste the text below.

    Thanks.

    Many of you have reported the issue documented at http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/c800abbc-5a67-4c43-bf61-e6d86f48658b and we thank you for that.  The details provided are helping us understand and ultimately fix the problem.  A fix is not yet available, but we are actively working on it and will release a permanent fix for this issue as soon as possible. We will update this post when it is available.

     

    This issue may impact you if ALL of the following conditions are met:

    -          You have Visual Studio 2008 with SP1 installed

    -          You are developing a managed language project (C#, VB, etc)

    -          Your project makes use of multiple threads

    -          You are debugging your project on a multi-processor or multi-core machine

     

    The potential symptoms include:

    -          When stepping through your project, sometimes your application continues running when it should have stepped.

    -          When stepping through your project, sometimes breakpoints that should be hit are not.

     

    There is a work around that may eliminate these issues for you.  We suggest that you try this until the permanent fix becomes available:

    Workaround:

    1)      Open Visual Studio but do not open any projects.

    2)      Start the Task Manager (Ctrl+Shift+Esc) and navigate to the “Processes” tab.

    3)      Right-click on devenv.exe and select “Set Affinity…” (this option is only available on multi-processor or multi-core machines).

    4)      Uncheck every CPU except one and click OK.

    5)      Open your project and debug as normal.

     

    Workaround notes and limitations:

    -          If you restart Visual Studio, you will have to repeat these steps.

    -          If you are attaching to a process to debug, you should perform the above steps on your target process before attaching Visual Studio.  (If you are debugging foo.exe, change the affinity on foo.exe.)

    -          If you are specifically testing or debugging your process to see how it works on a multi-core or multi-processor system, this workaround will not be sufficient since it forces your process to use a single processor or core when executing.

     

    Once again, please check back here regularly as we will update this posting when a fix is available.

     

    Thank you!

    The Visual Studio Debugger Team


    Brad Sullivan - Program Manager - Visual Studio Debugger
  • Tuesday, 14 October, 2008 21:09Jay Leiser 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi Brad.

    I have been active in this forum - trying to help you guys solve this problem,
    however now I am concerned that after waiting for close to 3 months,
    the problem may not actually be resolved.

    You see, I do not have a multi processor or Multi core machine and I have the problem.

    Please make sure that this information gets to the developers working on this problem.
    I was working together with Gregg Miskelly (greggm on the microsoft.com email server) giving him all of the details.
    The multi processor issue never came up, since I do not have that type of processor. I have a P4 - single processor.

    Thanks Brad.

    Jay Leiser

  • Wednesday, 15 October, 2008 5:29Marco Scholz 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hello,

    I'm also not sure of the theory with the multi-core processors.
    I have installed Sp1 for VS2008. I'm using a large C# project with many threads and I have a dual core (Athlon X2) processor and the problem does NOT occur. But a colleague has the problems (also dual core CPU, but Intel).

    One main difference between the two computers is the Windows Version. My colleague has a WinXP Sp3 and I'm using Vista SP1.

    I hope this will help you to completly eliminate this bug.

    Marco Scholz

  • Friday, 17 October, 2008 20:21Brad SullivanMSFT, 擁有者使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Using a single core won't eliminate the problem entirely, but it will make it less likely to occur.  If you are on a single core and are still seeing the issue, you can try removing some function evaluations from the watch window and that might help. 

    Those work-arounds aren't the real solution though.  We're getting really close to releasing a patch to fix this, so check back next week.

    Thanks.
    Brad Sullivan - Program Manager - Visual Studio Debugger
  • Friday, 17 October, 2008 20:30Jay Leiser 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    I am using a single core and do not have any watches but I am still seeing the problem.

    Jay Leiser
  • Friday, 17 October, 2008 21:38Brad SullivanMSFT, 擁有者使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    Your P4 might have hyper-threading, which could also cause this issue to occur.  Unfortunately, I'm not aware of a way to disable hyper-threading per-process.

    Thanks.


    Brad Sullivan - Program Manager - Visual Studio Debugger
  • Wednesday, 22 October, 2008 2:58Brad SullivanMSFT, 擁有者使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    Please see the following thread for updates and downloads to the fix.

    http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/f3fcb4fb-8a08-4fa0-8d58-9ed6f3eb1193

    Thanks!
    Brad Sullivan - Program Manager - Visual Studio Debugger
  • Thursday, 13 November, 2008 4:16Yort 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi Brad,

    We are experiencing this problem on some of our developers PC's, but;

    1. It only occurs in certain projects... we haven't been able to figure out what is unique about those specific projects or solutions, but it isn't merely the fact that they have multi-threaded code in them. However, it seems the problem will occur on any of our PC's in these projects, even though it doesn't happen in other projects on the same PC's.

    2. It is occuring on the PC's or laptops of developers with single cores, that as far as I can tell are not hyper-threaded... I don't believe one of the laptops actually has hyper threading capable hardware, and that laptop and another desktop PC display only a single CPU usage graph in Task Manager, yet still have the problem. I guess it's possible they are hyper threaded or have some other kind of CPU architecture that would do this, but I haven't found any evidence of that, and usually the CPU graphs are a nice easy way of determining how many logical core there are.

    3. It's been quite a long time since this problem was first reported, and there still doesn't seem to be a proper fix... can we have an ETA ?
  • Friday, 14 November, 2008 13:01Wacha 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    In my case, following the link to fix the problem has solved the issue.  Basically installing SilverLight 2 support in VS2008 has done the trick and we are developping multithreaded projects on Core 2 Quad processors.
  • Friday, 14 November, 2008 13:06eheinz 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Same for our development group using dual core processors.

    Thanks for the help.
  • Tuesday, 18 November, 2008 16:13TerryBurke 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    I am a new user of Visual Studio [Visual Basic], and it was only at the end of April 2008 that I downloaded Visual Studio Express 2008 in order to start the experience.   I created a very small project which worked fine.   This project was intended to help another person with some data processing issues, but by mid-June I hadn't received confirmation to proceed, so stopped work for the time being.
    A few days ago it was time to continue the project, so I started up Visual Studio Express again and loaded the project, but the instant I hit F5 [or used the menu to start debugging] to run the code the system displayed the project's form for a very brief instant and then reverted back to edit mode again.
    The reversion to edit mode was extremely quick, and on a smaller project it was so quick as to be almost instantaneous.
    I thought that I may have corrupted something, so yesterday [17th Nov] I executed a repair/reinstall job.  Unfortunately the results are exactly the same.
    During the 5 months that I have waited to resume the project I expect some updates have been installed but am not sure which ones.
    However, unlike users of the non-Express versions I receive absolutely no reason telling me what has happened, let alone why.
    Build works fine, but not debugging.   And this makes it impossible for me to use the software.

     

  • Tuesday, 18 November, 2008 16:21Jay Leiser 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    This has been addressed a few posts back in the thread. It is a link to another thread with a link to the fix.

    "Please see the following thread for updates and downloads to the fix."

    http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/f3fcb4fb-8a08-4fa0-8d58-9ed6f3eb1193


  • Tuesday, 18 November, 2008 16:58TerryBurke 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Unfortunately this statement about Silverlight is not totally accurate.   The Silverlight_Tools.exe upgrade/bugfix applies to Visual Studio 2008 SP1 or Visual Web Developer 2008 Express with SP1 only, not Visual Studio Express 2008.  I did actually try to run this installation software but it would not proceed beyond warning me that it needed to have installed at least one of the systems that I don't have.

    Maybe it's also worth mentioning that I run a single user single processor P4 standalone machine, and it's just over 4 years old.
  • Thursday, 26 February, 2009 15:15yuanliu1 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    many people said it did not fix the problem, including me.
    I uninstalled SP1 and hopefully the problem will go away.
  • Wednesday, 4 March, 2009 21:30yuanliu1 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi, 
    After I installed SP1, everything goes back to normal. so apparently it is a bug.
    So is anyone working on this or considering this has been "solved".
    Now automatic update always try to install SP1 to my VS, I have to disable it everytime...

  • Wednesday, 18 March, 2009 17:38GGulik 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Same thing here. Console app and a Wcf service host. Is this going to be fixed soon??
    CTO at ReachMail Inc
  • Wednesday, 13 May, 2009 20:36LavaBlast 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Silverlight tools doesn't fix the problem for me.  I have a Core i7 processor...
  • Wednesday, 3 June, 2009 16:25Thibaultb 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Same probleme for me. Fix doesnt work.
    I lunch my project and attach process. With that I can debug, but its very boring
  • Thursday, 16 July, 2009 6:45muthugp 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Is there any patch or update to fix this issue?

    I have created Event Receiver in SharePoint, while debuggin, the control jumps randomly and when it hits some break point randomly it says something like "The process or source changed since last step", i am sure i did deploy the dll to GAC, restarted the IIS.
    Its very annoying, affecting my productivity and reputation.

    Will try after unistalling SP1.