Take the 2-minute tour ×

So there I am, working on a Silverlight app, and between one build & run and the next, my debug output goes away. Where before I had dozens of lines of Debug.Writeline text, I now have only the module load and thread messages.

Yes, I'm in debug mode (vs. release mode).

Yes, my Output window says "Show output from: Debug".

Yes, when I right-click on the output window, every option is checked.

No, my Tools > options > debugging > general > "Redirect all output text to the immediate window" is not checked.

All I can figure (and it's a wild guess) is that for some reason, the VS debugger isn't attaching to the Silverlight app like it should.

What's weird is this has been happening for the last couple of days, out of the blue. And just as suddenly, all my debug messages start showing up again.

This is VERY frustrating.

EDIT: Of course, after returning to the project after the weekend, all Debug messages are back. No idea what was causing the issue, so I'm sure it will happen again.

Now the question is: should I leave this question open in case the problem arises again in the near future? What happens to an unawarded bounty?

share|improve this question
In situations like yours, I approach the problem by cutting things out until they work again. Depending on the size of your project, how many people are working on it, etc. this might not be easy, but can you create a new project, get your Debug.Writeline provably working, and start moving things over? I'm sorry if this sounds obvious, but it can do wonders to identify whether it's a general Visual Studio issue, a project issue, or a code issue. –  vpiTriumph Apr 24 '12 at 3:25
Are you compiling for more than one platform? –  WhiteKnight Apr 24 '12 at 13:48
@vpiTriumph: I've done exactly what you suggest on other projects. It's definitely a solution of last resort because it often hides the cause of the problem. In this case, it's an enterprise solution and would be a nightmare to re-construct. –  Klay Apr 25 '12 at 19:41
Only duplicate questions should ever be closed, but as you don't know what caused the problem, your question isn't really answered. If you don't manually award the bounty the reputation doesn't get awarded to anybody. See stackoverflow.com/faq#bounty for more information. –  WhiteKnight Apr 26 '12 at 12:39
show 1 more comment

4 Answers

Check the Immediate Window. Check the options. There is a general setting that says "send Debug output to Immediate Window"

share|improve this answer
add comment

I found the same problem and just by setting optionsdebuggingoutput windowThread Exit Messages to true the output windows was begin to send the right messages !?

share|improve this answer
add comment

Did you create or modify an Application config? If yes: the initial created configuration by VS does contains the necessary wiring configurations to enable the debugging at all. Not sure what and if there are counterparts in Silverlight, but in WPF environments simply replacing the app.config will have the same effect as you expierience.

share|improve this answer
Nope. Didn't create a new config. –  Klay Apr 25 '12 at 19:47
add comment

Ensure that the DEBUG conditional compilation symbol is defined. The Debug class suggests that you "add the /d:DEBUG option to the compiler command line when you compile your code using a command line, or add #define DEBUG to the top of your file".

share|improve this answer
add comment

Your Answer


