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 sloppy99 edited

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

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

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

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

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

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
sloppy99 avatar image
sloppy99 answered sloppy99 edited

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?

screenshot-2022-01-31-213541.jpg



10 |10000

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

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 19.1 MiB each and 23.8 MiB total.