Debug.Print not showing up
#1
Posted 03 August 2011 - 01:21 PM
I've just started working thru The Internet of Things book. Everything works great, except Debug.Print does not show up back in my Output window.
I am getting a bunch of startup and shutdown messages in the Output window, but not my message. Breakpoints work fine; everything else seems to be OK.
I don't see any Solution Properties that seem like they would toggle Output -- the only property settings touched were to switch to USB deployment and setting the Device.
Thanks for any suggestions
#2
Posted 03 August 2011 - 01:36 PM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
Posted 03 August 2011 - 02:12 PM
Are you using Visual Studio C# Express? If yes, then Visual Studio automatically chooses the Debug configuration when you choose Start from the Debug menu and the Release configurations when you use the Build menu (Debug.Print(...) output is not visible in Release build). You'd need to select the Debug configuration, check "Show advanced build configurations" in Tools - Options if the configuration toolbar is not visible.I've just started working thru The Internet of Things book. Everything works great, except Debug.Print does not show up back in my Output window.
#4
Posted 03 August 2011 - 03:46 PM
#5
Posted 03 August 2011 - 04:39 PM
Yep, that's right, it was discussed in Debug.Print stopped working - if the debug output appears in Immediate window, uncheck "Redirect all Output Window text to the Immediate Window" in Options dialog: Tools\Options\Debugging General.Also, there's an option in Visual Studio to redirect Debug output (to the Console window I think). I didn't know that existed, but someone had that particular issue previously in another thread.
#6
Posted 08 August 2011 - 09:19 PM
Sorry for the delay in my responding.
I seem to be getting other tracing sent to the Output window just fine. I have an excerpt below -- I would expect to see my Debug.Print msgs before "Done". Most of what I assume gets sent to Output is showing up, just not my stuff!
If I hook up MFDelpoy and Connect, it shows my Debug.Print.
If I set Breakpoints, I hit them and can inspect variables. So the debugger is fine.
There is nothing in the Immediate window, and the option to sent to Immediate is not checked.
Note: this is true with the Netduino Plus AND when I use the Emulator.
I am running Visual Studio 2010 Pro with SP1.
I am running on a 64bit Win7. I have the 64bit Netduino SDK installed. Anyone else running 64bit?? If I had to bet, I'd guess that there might be a problem with the 64bit SDK while the 32bit is OK.
Thanks for any ideas
...
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'D:\Proj\Netduino\play\VoltageReader\VoltageReader\bin\Debug\le\VoltageReader.exe', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.1\le\SecretLabs.NETMF.Hardware.NetduinoPlus.dll', Symbols loaded.
The thread '<No Name>' (0x2) has exited with code 0 (0x0).
Done.
Waiting for debug commands...
The thread '<No Name>' (0x1) has exited with code 0 (0x0).
The program '[9] Micro Framework application: Managed' has exited with code 0 (0x0).
#7
Posted 08 August 2011 - 09:24 PM
#8
Posted 16 August 2011 - 05:32 PM
I triedIf you put a "Thread.Sleep(Timeout.Infinite);" at the end of your Main routine, does that help your Debug info show up?
I'm just checking to make sure your Debug data has a chance to be printed before your app finishes. Shouldn't affect anything...
{Debug.Print("1"); Thread.Sleep(60000); Debug.Print("2")}
with a break on the second Print -- I hit the breakpoint, but never see the Print values.
Note: I see the same behavior with the Emulator - no output from Print. However, with MFDeploy I do see the Print output.
It's puzzling that the debugger seems fine -- I can set breakpoints, inspect variables -- but this one thing doesn't work.
#9
Posted 16 August 2011 - 06:31 PM
Do you have MFDeploy connected all the time (using 'Connect' command)? If so, disconnect it and you should see Debug.Print output in Visual Studio (you may need to launch the application again in VS).However, with MFDeploy I do see the Print output.
#10
Posted 28 September 2011 - 09:35 AM
#11
Posted 29 September 2011 - 10:40 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users