
Here are the steps to follow to debug your add-on:
" \work": to access a persistent storage that the add-on can use. \": to access the files from within the add-on package. In order to access files from within an add-on, filenames can be prefixed in two ways: extern "C" MSFS_CALLBACK void module_deinit(void): upon closing the game or after sign-out. extern "C" MSFS_CALLBACK void module_init(void): upon loading or after sign-in. In both cases the game will look for and execute the following module functions if they exist: As a gauge module which can contain one more gauge callbacks.
As a standalone module if it is placed in the modules subfolder of a package - it is then automatically loaded when the package is mounted into the VFS. Stepping into a function may display the Disassembly window instead of the original C/C++ source code.Ī WebAssembly module can be used by Microsoft Flight Simulator in two different ways:.
The Locals and Autos windows might have problems displaying the value of complex classes/structures. Please refer to the Locals and Autos windows for now. The Watch windows do not display the value of the watched variables. With the current releases of the game and SDK, the following limitations exist: To help you understand the capabilities of using WASM and the functions that are available to you, please see the following sections: WebAssembly itself doesn't offer API "X", "Y" or "Z" - it is up to its implementation to grant access to these APIs. The add-ons developed in WebAssembly for Microsoft Flight Simulator are not interpreted but rather converted to native code ahead of time. While WebAssembly itself is well documented, there seems to be some confusion as to how WebAssembly modules can be run outside of a web environment. GDI+ wrapper based on the NanoVG API to facilitate porting existing add-ons. Higher level NanoVG API for 2D graphics. Large support for the standard C++ library (see below). Full support for the standard C library. Debugging of WebAssembly modules by attaching to the game executable. Direct compilation of C/C++ projects into WebAssembly.
In order to do so without requiring a full rewrite of existing add-ons, a new platform toolset was designed for Visual Studio with the following capabilities: In order to provide both security and portability, it was decided to move away from add-ons distributed as DLLs in favour of add-ons distributed as WebAssembly modules.