I'm having an issue debugging my project on the Netduino. Visual Studio appears to deploy the project correctly, but if I try to start a debug session, it hangs on "The debugging target is not in an initialized state; rebooting..."
Per the advice here, I've tried flashing the board with both 4.1.06 and 4.1.1.0 Beta 1
In both cases, at the completion of the flash, MFDeploy appears to hang with the message "Executing Application". If I pull the plug on the Netduino, then check the configuration, it appears to have been deployed successfully with the correct version.
When pinging, I get "Pinging...TinyCLR"
So I've then tried again to debug, with the same results.
Pushing the reset button causes the blue light to appear for a second, but does not cause Visual Studio to proceed.
I am running a VMWare Windows XP SP3 on a Windows 7 host. I have successfully deployed via this environment in the past.
Any advice would be appreciated.

Cannot debug: "The debugging target is not in an initialized state; rebooting..."
Started by Joey, Oct 08 2011 11:27 PM
2 replies to this topic
#1
Posted 08 October 2011 - 11:27 PM
#2
Posted 09 October 2011 - 02:26 AM
The problem might be that your app is blocking on some line or in a VERY tight loop so the debugger can't hook in. The netduino's loaded app always* runs after a reboot -including MFDeploy's frequent reboots. I try to insure my apps end eventually (in normal and in error conditions) or they include thread.sleep() inside any infinite loops.
If you comment out the code in main(), does it deploy and start flawlessly? Does MFDeploy work smoothly? Yes, the functionality will be impaired slightly, but you'll be learning a valuable lesson.
*There's an MFDeploy Debug menu item called "Reboot and Stop" which might be the exception to this rule. It might also help here.
- Dan
[Disclaimer: I'm not an expert, yet.]
#3
Posted 09 October 2011 - 02:45 AM
...I try to insure my apps end eventually (in normal and in error conditions) or they include thread.sleep() inside any infinite loops.
If you comment out the code in main(), does it deploy and start flawlessly? ...
Thanks Dan. No dice. I tried with the following code:
public static void Main() { var v0Port = new OutputPort(Pins.GPIO_PIN_D0, false); bool toggle = false; while (true) { toggle = !toggle; v0Port.Write(toggle); Thread.Sleep(1000); } }
...and had the same issue. Also, I've since tried deploying my program from the host (not the VM), and it works.

What I also realized is that once the code is deployed, it doesn't seem to auto execute. If I hit the reset button on the board, it will start execution, but the debugger doesn't attach. So I'm lead to believe that Visual Studio is not able to successfully restart the Netduino (and my manual restart somehow prevents the debugger from attaching).
I wouldn't say smoothly. Like I said in the original post, it appears to hang at "Executing Application", but a configuration check after a manual reboot appears to show that the Firmware update was successful. It does look like the same type of symptom, as if it is not able to restart the Netduino successfully.Does MFDeploy work smoothly?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users