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

Odd behavior when debugging

debugging

  • Please log in to reply
No replies to this topic

#1 MarkNic

MarkNic

    Member

  • Members
  • PipPip
  • 22 posts

Posted 02 February 2013 - 10:54 PM

I'm creating a fairly complex application using multiple classes to describe objects that I'm controlling through Netduino.  When you create public/private/static fields or properties that are input or output ports and hit a breakpoint in a debug session, and look at the values within the class, fields show up as "?" question marks with no values.

 

Simple example:

public class PortTest {

  public string AName { get; set; }

  public InputPort MyPort { get; set; }

  public PortTest() {

  MyPort = new InputPort(Pins.GPIO_PIN_D0, false, Port.ResistorMode.Disabled);

  AName = "testing";

  }

}

 

public static void Main() {

  var myport = new PortTest();

}

 

Set a breakpoint on the curly brace at the end of Main, run then look at myport.  You should see the AName property with the value of "testing".  After that, you should see just a "?".

 

Now, if you change the name of the AName property to Name in the class, you should see 2 "?".  You won't see Name because the values are shown alphabetically and anything after the port property isn't shown.

 

If you remove the line of code that actually new's up the input port, you will see MyPort = null and Name = "testing"

 

I've tested with N+ and N+2 on Windows 7 and Windows 8.

 

Is this a known issue or is there something I can do to make values show in debugging?  Now, I could prefix all my port field names with "Z" so they show up after all the other fields and I'll be able to see values while debugging - doable but clearly not that convenient.

 

Thanks,

 

Mark

 

 

 

 

 







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.