Program pauses for awhile at the end during debugging

I am brand new to the FEZ Panda II and to NETMF, so please bear with me…I don’t know if this is expected behavior or not. I didn’t see mention of it in the tutorials.

When I run even a very simple NETMF program (the standard example that just does a Debug.Print of “Amazing!” to the VS 2010 output window) on the FEZ Panda II, it always “hangs” for around 30 seconds at the end of Main, after everything has executed. The program runs to completion (printing the message on the output window), but VS 2010 stays in “running” mode, and if I want it to quit, I have to click the Stop Debugging button to get back to program editing mode.

What I see in the output window is the following (line numbers added for discussion purposes):

  1. The thread ‘’ (0x2) has exited with code 0 (0x0).
  2. Amazing!
  3. The thread ‘’ (0x1) has exited with code 0 (0x0).
  4. Done.
  5. Waiting for debug commands…
  6. The program ‘[2] Micro Framework application: Managed’ has exited with code 0 (0x0).

There is a pause of about 30 seconds between line (3) and line (4), during which VS 2010 is still in “running” mode and nothing is displayed. Then, lines (4), (5), and (6) are suddenly displayed and VS 2010 pops out of running mode and into editing mode.

Is this normal/expected behavior, or does it point to some sort of problem?

I have confirmed that I have the latest firmware and matching SDKs. I’m running VS 2010 Ultimate with SP1.

It wouldn’t matter much if this behavior is correct or not as embedded system are not suppose to exit. I mean you will never need to write an application that reach the end of “main”

I’d say the conditions you’ve described are pretty much normal. As gus has said, embedded apps are not meant to finish running, so you shouldn’t ever get to this point. If you do, there is something wrong in your applications logic :slight_smile:

I’ve noticed a similar behavior and usually just stop debugging to save those 20-30 secs. I’ve seen no adverse effects in doing so.