Help please. Debug.Print not working

After the installation of Visual Studio 2012 Express in the firist time I got regularly Debug.Print messages in the Output Window. Suddenly, I dont know why, Debug.Print Messages did not longer appear in the Output Window. I searched for the reason for hours, deinstalled and reinstalled the GHI-SDK, NETMF and Visual Studio Express 2012. No success!
Can there something be wrong with the listeners of VS 2012?
System: Windows 8.1 32 Bit
Visual Studio 2012 Express
SDK 2013-R3
Can somebody help?

@ RoSchmi - If you connect with MFDeploy do you see the messages?

@ taylorza -
Hi taylorza, happy new year.
Seems that I get no Messages.

@ RoSchmi - Make sure that “TINYCLR_TRACE,TRACE” is in the list of conditional compilation symbols in the build tab of all of your project properties in the solution.

@ RoSchmi - Thank you and Happy new year to you as well!

Last question, have you rebooted your machine, I know that you probably have given all the install/uninstall activity, but I thought I would ask just in case.

What’s with the errors? I would reflash your device until it responds properly in MFDeploy.

Thanks, now after rebooting I can connect with MF-Deploy and get the Messages there.
Valkyrie-MT can you send me a Picture where I have to look and how the Settings should be?
… and now I have to stop struggling with my Computer for some hours. Come back when i have time for it again.
My code:

namespace GadgeteerApp4
    public partial class Program
        Thread DebugPrintThread;
        void ProgramStarted()
            Debug.Print("Program Started");
            DebugPrintThread = new Thread(new ThreadStart(RunThread));
        void RunThread()
            while (true)

My conditional compilation symbols look like this (see Picture)
If I add “TINYCLR_TRACE,TRACE” it makes no difference

@ RoSchmi

I myself have had that problem as well in the past. Make sure that you have checked/unchecked where the output goes. See the attached image. If you have it checked like mine, all debug output goes to the Immediate Window and not the output window.

@ scardinale -
Hi, thank you. I tried this checked and not checked. No Messages in Output window or direct window.

Is it allowed to have both, VS 2010 and VS 2012 installed at the same time?

I suspect that the netmf SDK will not be able to handle the situation of having two VS versions installed. I can say it wouldn’t be tested and proven TO work… but I have to ask, why do you need both?

@ Brett -
Hi, thank you.
yes, if I find no reason I’m going to deinstall VS 2010 and try this

@ RoSchmi

I have both 2010 and 2012 (both Ultimate) installed and have not had any problems thus far.

I, too, have been running both 2010 (Express) and 2012 (Ultimate) side by side with no ill effects.

I run VS2010, 2012 and 2013 with no issues with Gadgeteer and vanilla

Thanks to all for your informations.
Problem still not solved, but I gathered some informations:

If I start VS 2012 with administrator privileges all works fine and I get after deploying the message:
Using GHI Mainboard…
and the
"Program started" message.
When I start with normal user privilges these messages are missing.
Giving administrator privileges to my user account does not fix the issue.
Inactivation of firewall or virus-scanner has no influence.

As a next step I want to look if I have a system recovery point before the issue occured.
Perhaps it has to do with registry entries that cannot be read or changed with normal user privileges.

Any other suggestions?

Being logged in as administrator does not give VS administrative rights. You have to run it explicitly as administrator, as you found out. This is by design, but that’s all I know about that. A system restore is kind of a blunt instrument approach. I’d first check to see what changed in between the working point and the broken point. I don’t have VM Win 8 in front of me, but in Win 7 I can see the install date of programs and Windows updates. See if you can narrow it down to a suspect or two and try uninstalling them. I have had many cases where the cause of something suddenly being broken for no apparent reason was a Windows update, most often with Office.

Addendum: Here is a link to tasks known to require running VS as Adminstrator. However, I don’t believe any apply here.

This was a long journey until I finally found the reason:

Visual Studio has an option to hide program output from the output window. Right click on the Output Window while debugging (set a breakpoint to give yourself enough time). You should see several checkboxes on the context menu. Make sure that ‘Program Output’ is checked.

1 Like

Glad you found it! That’s an obscure setting…

Same problem here :slight_smile: Thx for the solution