5.7.6.9 Semihost Option

The -msemihost option links in a library that allows the redirection of output from stdout functions, such as printf(), to the host PC when debugging.

With this option enabled, the debugger will break execution whenever data is detected in the stdout stream. With appropriate configuration of your source code and the IDE project, this data can be sent to the Output view in the IDE. See the Step-by-step guide to enable semihosting in your application section in the MPLAB X IDE User's Guide for more information.