How to know if Fez Config is connected?

Say, I want to know if there’s a debug output listener (Fez Config, for example) connected to a NETMF device. How to know that from inside the program? I always thought that Debugger.IsAttached property can be used for that, but apparently it could not:

    public static void Main() {
            var ledPort = new OutputPort(G400.PD18, false);

            while (true) {
                if (Debugger.IsAttached) ledPort.Write(true);
                else ledPort.Write(false);

                Debug.Print("Printing something");


This trivial program lights up a LED if IsAttached property is true. Works if connecting Visual Studio. Does not if using Fez Config. Any ideas?..

@ Simon from Vilnius - Do you see the same behavior with MFDeploy?

Yup. No LED with MFDeploy.

So?.. No ideas? Anyone?..

@ Simon from Vilnius - I’m not aware of a way to check.