Imposible to get WASM debugging

I have spend a ridiculous amount of time trying to debug WASM gauge modules,
despite of following the SDK instructions and all sort of things, not matter
what I do, the VS 2017 debugger is just not hitting any break point lines on
the code, and I am 100% sure the lines are being hit since the WASM module is
working, I am overriding the airplane throttles to 30% and I see the behavior
occurring in the sim correctly. The question is, what on earth I have to do to
be able to debug the code? I am attaching VS debugger to Flightsimulator.exe,
and yet nothing happens… what I am doing wrong? I am loosing my mind. See the
picture below, all attached, running… and yet… unable to debug WASM.
Interesting enough the debbuger is flooded with this error when attaching to
MSFS: Exception thrown at 0x00007FF644326180 in FlightSimulator.exe:
0x80000004: Single step.

What I
can do to be able to move forward? this can’t be this hard surely? Thanks in
advance, Simbol

Hi there! Which version of the sim are you currently using? Are you 100% sure
the module being used has been compiled in its Debug configuration and not its
Release one? Do you have the same problem with the GaugeAircraft sample? Best
regards, Eric / Asobo

Hi Eric,

First many thanks for extending your help so quickly. I am using MSFS
version 1.17.3.0
and SDK version 0.13.0. As far as I am aware the module
is compiled as debug… and I am 100% sure the module is loading since when I
change the code (for example throttle to 60%), I re-compile, re-copy the .wasm
module inside the panel and reload the airplane, the throttles go at 60%, if I
changed the code and repeat to 10%… the behavior reflects in the sim. The
GaugeAircraft sample provided with the SDK is not compiling, it has lots of
errors… so I started a new module from scratch, which is compiling and
working inside the sim as intended.

See pictures, project set to debug settings
attached.

Not sure what else to try…

Regards, Simbol

Eric, Further update, I got it working finally!! I compared the project
properties 1:1 with the stand alone WASM module in the SDK and the problem is
the highlighted property on the picture was NOT SET.

There must be some issue with
the SDK + VS 2017 because if I am starting a project from scratch or migrate a
project to MSFS WASM this properties should be set automatically for us no? if
this is not the case, then we need to update the documentation so people is
aware this is a requirement or they will struggle to be able to debug their
modules properly. Once again, many thanks for responding so fast to me… hope
we can investigate further why this setting is not being automatically set, so
we can avoid further pain to others. All the best, Simbol

Hi again! How do you start a project from scratch with VS2017? VS2019 has MSFS
Templates that set all these settings for you. You’re right that we should add
a line about this in the “Migrating a project” section of the online help. :slight_smile:
Best regards, Eric / Asobo

Hi Eric, Sorry for the delay, with VS 2017 there are not templates available
for WASM as indicated in the SDK documentation… So the only option is to
create an empty C++project and migrate it to WASM, unfortunately the migration
doesn’t set anything automatically for your project either…

Regards, Simbol