Configuration.DebugInterface on UART?

IS there any way to bring the debug messages on a com port

Configuration.DebugInterface.Set(Configuration.DebugInterface.Port.COM1, Configuration.DebugInterface.Port.COM1);

There is a pin to switch debugging to serial. Can’t be done in software.

Good it works on COM port now. I like the new pin method rather than the old software method

But now I want a way to detect the debug port mode, so I can enable USB device based on that.

Do I set the pin as input and sense high/low

is there a function I can call to detect this?

I don’t know if you can read it directly in SW, but you could pull down any other GPIO in parallel, This would be easy to read.