Workflow with external EXE or DLL modules on MSFS202x

Hi everyone,

I need to work on an external EXE module (not WASM, for now, for various reasons) that is loaded through EXE.XML (as described in one of the older posts in this forum). So far I have the exe loading no problem, and everything is working, but I find the workflow extremely cumbersome. Every time I make a change and recompile, I need to restart MSFS.

I tried “edit and continue” in the Debug mode, but as soon as I “Attach to process” and attach to MSFS in the debugger, I get an exception saying one of the PDBs is missing (I can supply the exact message).

Is there a better workflow for this? Can I “edit and continue” reliably, as the sim is running? I am accustomed to WASM in-sim development, which reloads the module real time without the need to re-start the sim, and the debugger actually works.

Thanks in advance for any bit of info you may have.

Arn’t you attaching to your .exe? Attaching to MSFS itself might cause more problems then you want, unless you have a dev build but then you wouldn’t ask that question here. :slight_smile:

1 Like

The solution is way simpler:

  • Don’t put the .exe in the EXE.XML when debugging, that’s only for final distribution.

  • Don’t use the Attach function of the debugger, it’s an .exe, so it’s way simpler than that: simply keep the sim running, Build the program and Start and Restart it from Visual Studio.

There’s no need to restart the sim, because if you are making a regular Windows .EXE as a Simconnect client, it’s completely separate from the simulator, it runs into its own address space, and if you build in Debug mode, you’ll have all the debugging features available and you won’t encounter any of the issues caused by running MSFS under the Debugger, which is not needed in this case.

Now, I see the title of your topic is mentioning .EXE or .DLL, but they are completely different.

The above workflow works only for .EXE, as far as I know, there’s no way ( at least not a documented way ), to make non-WASM .DLL modules that run in-process with the sim.

1 Like

THANK YOU!

That’s great - I, for some reason, thought the only way to load/mount EXE was through EXE.XML. Never occurred to me to just… run it!!

Re: DLL, There is a thread on this forum where one poster is claiming that they are mounting both DLLs and EXEs through EXE.XML. I’ll look for it and update this message with the link to the thread.

Thanks again!

Hi, thanks for chiming in - resolved as per the post below. I was doing something worth of a major forehead slap :crazy_face:

But yes - I thought the same workflow that is in place for WASM is required for EXE. For WASM, we attach the WASM module to MSFS2020 process… but that’s because it is an in-sim process.

1 Like