plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!

question

RoscoHead avatar image
RoscoHead asked Arzop commented

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?

wasmdevs
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

· Write an Answer
Arzop avatar image
Arzop answered Arzop commented

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

5 comments
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Sorry for being such a n00b, but how do I activate that?
0 Likes 0 ·
NVM found it, but setting it to fast makes no difference.
0 Likes 0 ·

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

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.