Debugging stand-alone module

I’ve managed to get the VS2019 debugger to attach to a stand-alone WASM
module, and it’s stopping at break-points, but in the locals window, all
variables show as “Variable is optimized away and not available”. This is a
debug build and I’m pretty sure all the optimizations are switched off, is
there something else I’m missing?

Hi, Did you activate the Fast Wasm Compilation mode? In “slow” mode, compiler
optimizes some part of the code, which can explain your problem.

Best regards

Maxime / Asobo

Sorry for being such a n00b, but how do I activate that?

NVM found it, but setting it to fast makes no difference.

Hi, Did you recompile your dll once you activated the “Fast Compilation” mode?
Just to be sure:

  1. Recompile your wasm in debug mode
  2. Remove generated folder which contains dll, obj, pdb…
  3. Activate “Fast Compilation”
  4. Fly

If it still doesn t work, that means there is a bigger issues with debugger

Best regards

Maxime / Asobo

Hmm yep, that’s pretty much what I do, except I compile in a different folder
& copy the WASM over to the modules folder after it compiles. Could that be
the problem?

No, it is not a problem. In which folder do you copy your wasm file?

I have the same problem with my WASM. I have “Fast WASM Compilation” marked in
MSFS and no optimization in my Debug properties. Anything else i have to do?