Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Debug.Print stopped working


  • Please log in to reply
13 replies to this topic

#1 dman776

dman776

    Member

  • Members
  • PipPip
  • 19 posts

Posted 21 April 2011 - 11:55 PM

Any ideas on why my Debug.Print lines stopped working?

using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;

namespace test1
{
    public class Program
    {
        public static void Main()
        {
            // write your code here
            Debug.Print("test 123");

        }

    }
}

It worked when I initially got my N+, but, no longer. It doesn't work on my regular netduino either.


HalSystemInfo.halVersion: 4.1.2821.0
HalSystemInfo.halVendorInfo: Netduino Plus (v4.1.1.0 b1 with extra RAM)

Ideas?

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 April 2011 - 02:14 AM

Hi dman776, Where are you looking for your debug data to print? In the Output window? What if you connect from MFDeploy--does it show up in the window there? Chris

#3 dman776

dman776

    Member

  • Members
  • PipPip
  • 19 posts

Posted 22 April 2011 - 02:27 AM

Hi dman776,

Where are you looking for your debug data to print? In the Output window? What if you connect from MFDeploy--does it show up in the window there?

Chris


Good call! It does NOT show up in the Output window in VS2010 but it DOES show up in MFDeploy.
any ideas?

Darryl

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 April 2011 - 03:32 AM

Hi Darryl,

Good call! It does NOT show up in the Output window in VS2010 but it DOES show up in MFDeploy.
any ideas?

Can you post a screenshot of your Netduino app running with the Output window visible--so we can see a snapshot of what's going on?

You can still deploy and debug from Visual Studio, correct?

Chris

#5 dman776

dman776

    Member

  • Members
  • PipPip
  • 19 posts

Posted 22 April 2011 - 04:50 AM

Hi Darryl,


Can you post a screenshot of your Netduino app running with the Output window visible--so we can see a snapshot of what's going on?

You can still deploy and debug from Visual Studio, correct?

Chris


Yes, deploy and debug work properly with the exception of the Debug.Print().
Screenshot attached.

(And there is no text after the "Ready" line in the window.)

Darryl

Attached Files



#6 dman776

dman776

    Member

  • Members
  • PipPip
  • 19 posts

Posted 22 April 2011 - 04:53 AM

And here is the Device capabilities from MFDeploy:

Connecting to NetduinoPlus_NetduinoPlus...Connected
HalSystemInfo.halVersion:               4.1.2821.0
HalSystemInfo.halVendorInfo:            Netduino Plus (v4.1.1.0 b1 with extra RAM) by Secret La
HalSystemInfo.oemCode:                  34
HalSystemInfo.modelCode:                177
HalSystemInfo.skuCode:                  4097
HalSystemInfo.moduleSerialNumber:       00000000000000000000000000000000
HalSystemInfo.systemSerialNumber:       0000000000000000
ClrInfo.clrVersion:                     4.1.2821.0
ClrInfo.clrVendorInfo:                  Netduino Plus (v4.1.1.0 b1 with extra RAM) by Secret La
ClrInfo.targetFrameworkVersion:         4.1.2821.0
SolutionReleaseInfo.solutionVersion:    4.1.1.0
SolutionReleaseInfo.solutionVendorInfo: Netduino Plus (v4.1.1.0 b1 with extra RAM) by Secret La
SoftwareVersion.BuildDate:              Apr 10 2011
SoftwareVersion.CompilerVersion:        400902
FloatingPoint:                          True
SourceLevelDebugging:                   True
ThreadCreateEx:                         True
LCD.Width:                              0
LCD.Height:                             0
LCD.BitsPerPixel:                       0
AppDomains:                             True
ExceptionFilters:                       True
IncrementalDeployment:                  True
SoftReboot:                             True
Profiling:                              False
ProfilingAllocations:                   False
ProfilingCalls:                         False
IsUnknown:                              False


#7 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 22 April 2011 - 06:16 AM

Good call! It does NOT show up in the Output window in VS2010 but it DOES show up in MFDeploy.

Do you have MFDeploy connected (via F5 or menu Target/Connect) when you are using Visual Studio? If so, you'd need to disconnect MFDeploy (Ctrl+F5) to see the output in Visual Studio window.

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 April 2011 - 07:37 AM

Hi Darryl, Are you deploying via a serial port or USB? This may be a bug to report to Microsoft. Very, very odd. Chris

#9 dman776

dman776

    Member

  • Members
  • PipPip
  • 19 posts

Posted 22 April 2011 - 02:00 PM

USB. I'll try on a different computer and let you know.

#10 dman776

dman776

    Member

  • Members
  • PipPip
  • 19 posts

Posted 22 April 2011 - 04:35 PM

I figured it out! It is showing up in the "Immediate Window" now, not the DEBUG Output window!

#11 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 23 April 2011 - 06:43 PM

I figured it out! It is showing up in the "Immediate Window" now, not the DEBUG Output window!

I see. You should be able to bring the output back to "Output" window by unchecking "Redirect all Output Window text to the Immediate Window" in Options dialog: Tools\Options\Debugging General (if it is checked).

#12 dman776

dman776

    Member

  • Members
  • PipPip
  • 19 posts

Posted 25 April 2011 - 12:18 PM

Thanks guys! It's working as expected now. I appreciate the assistance!

#13 Steve88W

Steve88W

    New Member

  • Members
  • Pip
  • 3 posts

Posted 02 May 2011 - 09:15 PM

^bump Thanks guys... was pulling my hair out over such a newbie mistake...

#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 02 May 2011 - 09:35 PM

I didn't know one could redirect the Debug output... I love that I can learn something new with Netduino and .NET MF...and then use that new thing in other C# applications as well.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.