Using the Microchip Graphics Suite (MGS) Simulator in Native Mode
Introduction
Native mode allows the Graphical User Interface (GUI) application developed with Microchip Graphics Suite (MGS) to be converted into a CMake® project within Microsoft® VS Code®, enabling it to be built and executed directly on a PC.
By leveraging VS Code, developers can use native mode simulation for source-level debugging and development, making it easier to test, troubleshoot, and refine their GUI applications without needing embedded hardware.
This approach streamlines the development workflow, providing a familiar environment for code editing, debugging, and iterative improvement.
Prerequisites
Before you begin, you must be able to generate an MGS Simulator project in VS Code. If not, please refer to the Using the MGS Simulator for VS Code guide.
Using the Native Mode
Exporting to a VS Code® Workspace
Click the
button on the MGS Simulator tab and select Export (Native). The PROJECT DETAILS should show Native.

Click the Export (
) button to export the MGS application to a VS Code workspace. When prompted for the Export Directory, navigate to your preferred location and click Select Folder.

The MGS Simulator will export the MGS application to a VS Code workspace in the selected location and will automatically launch another VS Code window using the Native Mode workspace.

Running the Native Mode Simulator Project
To build and run the project, click Run and Debug
and click the Start Debugging
button.

The VS Code terminal will show the progress of the build. If the build is successful, the GUI will launch in a separate window.

Debugging the Native Mode Simulator Project
Since the Native Mode Simulator project is running in VS Code, the debugging features of VS Code are available for developers.


