Link to home
Start Free TrialLog in
Avatar of nhwilly
nhwilly

asked on

VS2010 Debug works for a while and then simply does nothing

This is driving me bats.

I'll be coding, then debugging and doing the usual: edit, debug, test, edit, debug, test, etc.  Everything is fine for a while and then, out of the blue, I'll press F5 or the little green "play" button and it looks like it's going to do something (the play button dims) and then it just returns to the editor (the play button goes green again).

Nothing.  No error messages, nothing breaks, the code changes are not breaking anything.  Just doesn't want to debug anymore.  (That's two of us.)

Clues:
1. 64bit Win 7 (all patched)
2. VS2010 (all patched)
3. Always goes back to working on reboot.
4. Sometimes goes back to working on restarting VS2010
5. Not project specific
6. No error messages of any kind
7. No known hardware issues (happens on my desktop, too)
8. Switching the config drop down in the tool bar from debug to release will make the problem stop - for a while.  Then it starts again in release mode.

The only other thing I've seen like it is the problem with Win 7 where if you have a folder sorted by Date modified, deleting the file doesn't refresh the display right away.  The file looks like it's still there, but it's not.  Change it to sort by name and the deletion takes place immediately.  Maybe this is related.

I can't get squat done like this.

Has anyone seen anything like this?  I've checked all over but even the research is taking forever and I'm not getting anywhere.

Thanks in advance.
Avatar of Orcbighter
Orcbighter
Flag of Australia image

Have you tried just stopping Visual Studio and then starting again and loading up the project? Rather than rebooting the whole machine.
Avatar of nhwilly
nhwilly

ASKER

Yes. See #4 above. Exit out of VS, wait 20 minutes. Still does nothing.
There seems to be a problem with the VS2010 debugger in that it randomly just ignores breakpoints, especially when related to unit tests.
Microsoft think they have a fix:
http://blogs.msdn.com/b/jasonz/archive/2010/12/07/announcing-visual-studio-2010-service-pack-1-beta.aspx
.
Avatar of nhwilly

ASKER

I'm not sure I've experienced that exactly.  I have had conditions where a change in a dll that is referenced in a project is not updated, meaning that code in the dll that are set as break points don't get executed.  But they appear as a hollow dot and there's a tooltip that says as much.

That's not what's happening here.

My problem doesn't involve breakbpoints.  Just running the program.   Maybe they're related, I don't know.

Thanks, though.
Let me understand you correctly.
You debug your program and edit changes continuously. Your wording implies you use F5 (run) rather than F10 (step into) when you do this, and you wait till the breakpoint over the code being examined is triggered for execution to stop.
Occasionally, you press F5 and the program "just returns to the editor", with no signs of problems or even of execution.

(1) Are you saying the program does not execute on these occasions, or that it executes but just doesn't stop at your breakpoints?

(2) If you had no breakpoints set, and pressed F5, would the behaviour of your program differ in any way from when you experience one of these Debug failures?

Avatar of nhwilly

ASKER

#1 - correct.Breakpoints set or not - still does nothing. Doesn't run at all.

#2. - that's right. No difference in behavior.

Odd isn't it?
OK, If there is no difference in behaviour between running your code without breakpoints, and running your code when one of these debug failures occur, on what basis do you assert that the program does not run at all on these failure occassions?

Is there some action your program does that can be independently verified (like writing to a file)? So that you can say "my program did not run" if that action is not done?

If yes, then you response to my question #2 is incorrect. If no, then we can investigate further.
Avatar of nhwilly

ASKER

Well, this would be a form that should display, or a console window that should show some results or whatever.

I press F5 and it looks like it's going to start up, but then just returns to the editor.  Nothing happens at all.  Almost like my program started to run and then exited without doing any work or displaying any errors.

I guess I should not have classified this as solely a debug problem.  I just always run in debug mode during my development.

It also happens when I run the program in "release" mode and there are no breakpoints set, either.
OK, the fact that this problem happens in release mode is an important bit of information that was ommitted in you original description.
Does this problem also happen outside of the IDE? Have you run and rerun this program stand-alone and seen this problem?
Is your program an exe or a dll?
If an exe, is it a Console app or a Windows form, or is it a service?
If a dll, how are you calling it?
Avatar of nhwilly

ASKER

Oh, I thought #8 in my first post was clear that it happens in release mode.

What might not have been clear, and for that I apologize, is that this never happens outside of the IDE.

I don't write services often and this has happened in WPF and console apps.  Been a long time since I've done any WinForms stuff.  All inside the IDE.

These are all exe's, but the solutions are often made up of multiple projects, which are referenced properly and then namespaces imported.

Happens in VB and in C#.
OK, another point of clarification (PS. apologies about missing point 8)
You say that "these are all exes, but the solutions are made up of multiople objects..."
So, You have a project that copiles to an exe. This project contains multiple projects (all executables) that are referenced from your program... How are you calling them?
These programs are made up of multiple objects...I take this to mean that these objects are separately compiled objects (such as DLLs) and not ojects created within code within your program?
Avatar of nhwilly

ASKER

Right, I'll have a business DLL containing my basic entities in one project.  In another project, I'll have a console application that compiles to an EXE.

The console app EXE uses the DLL entities to do work.

Textbook organization.
ASKER CERTIFIED SOLUTION
Avatar of Orcbighter
Orcbighter
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial