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