RE: Step by Step skips large chunks of code



We have found out several things about this problem. It seems to be linked to
VS2008/SP1. I moved my test code from Vista Ultimate 64 to XP 32 where VS2008
did not have SP1 installed. The code did not exhibit the skipping problem.
Putting on SP1 the problem occurred. I am going to try this again on a vista
machine to verify that SP1 is actually causing this, but I am fairly sure
that something in SP1 is causing this.

When running the program debugging works normally in the main process/thread
but has problems as soon as we set a break point within any of the worker
threads. When testing this problem, I only have break points set in one
worker thread so we don't get the debugger jumping around.

Watching the thread window, the debugger seems to work OK in the main thread
but skips in any of the worker threads.

Changing the application to not use threads would be tough. This
program/service was written from the beginning to use internal thread pools
to do the work

I am working on a repro I can send you.

I opened a support incident on this, SRX080926600877, since I need this
fixed quickly. I only seem to get one response per day from the news groups.
--
Scott


""Hongye Sun [MSFT]"" wrote:

Hi Scott,

Do you mean that the debugger skips code only after multi-threads start
running? This is a very important information to this issue.

First, in order to isolate the problem, could you please stop running
multi-threads in your application? Check if the problem still remains while
no user created threads running in the application. You could do that just
comment the code to create new threads.

Second, let us monitor the threads in the Threads window. We could fist run
the application. When the breakpoint just before starting multi-threads is
hit, we could open threads window from menu [Debug] / [Windows] /
[Threads]. (The thread menu is only available when debugging) Inside the
threads table, it has thread id, category, name and location. Current
running thread is marked by a yellow arrow on the left side. Make sure
current thread is main thread. Then start stepping code. Check if the
current thread is always main thread.

The reason why we monitor the threads when debugging is because other
thread may hit the breakpoint when you stepping. That will switch the
debugger to other thread, so the main thread will not go on stepping
anymore in some situation.

Is it possible for you to create a small project that can reproduce the
error and you can send me through email?
If it is too hard, could you copy the routine code and thread running code
here or send me email so that I can do some reproduction attempts on my
side? (hongyes@xxxxxxxxxxxxxxxxxxxx, remove 'online.')

Please try to monitor the threads and let me know the result. Thanks.

Regards,
Hongye Sun (hongyes@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • Re: SQL2k debugging broken/problem
    ... Used a win2k3 (without sp1) pc and tested debugging in QA and VS.Net against ... win2k3 pc and debugging against a remote sql server worked. ... > Debugger" topic in SQL Books Onlineto troubleshoot the issue. ...
    (microsoft.public.sqlserver.tools)
  • RE: Step by Step skips large chunks of code
    ... Do you mean that the debugger skips code only after multi-threads start ... let us monitor the threads in the Threads window. ... Then start stepping code. ...
    (microsoft.public.vsnet.debugging)
  • Re: windows debugger not working
    ... actually i'm using the browser feature on debugger, ... I reformatted the drive, reinstalled vista 32, sp1; ... OS: Vista Ultimate Sp1 ... Hard Drives: WD Caviar Green 1 TB SATA Model: WD10EADS ...
    (microsoft.public.windows.vista.general)
  • Re: .net 1.1 sp1 install may have broken vsnet debugging
    ... position to help you troubleshoot your debugger, ... Now that I know that you are, in fact, running on Windows Server 2003, I ... the name for SP1 in Add/Remove Programs ... If uninstalling SP1 does not fix your problem then I would strongly ...
    (microsoft.public.dotnet.framework.setup)
  • Re: Step by Step skips large chunks of code
    ... Do your threads throw exceptions, ... the debugger will automatically break it when an exception is thrown. ... You can send feedback directly to my manager at: ... Added SP1, the debugger started skipping within threads. ...
    (microsoft.public.vsnet.debugging)