Hello there, For experimentation I have installed VS 2022 today with the WASM
debugger extension, I launched MSFS with the -Allowdebugger and I am able to
see variables, etc. in VS after attaching the FlightSimulator.exe and the WASM
in debug mode. However I am unable to edit the WASM and continue, what is the
steps to enable this feature? I am very interested on this since it will speed
up my developing time considerable, I mostly use WASM for my projects, so I am
very exited about this property mentioned in the SDK release notes. Thanks in
advance for any help. Best, Raul
Hi @Simbol, You can find information regarding Edit & Continue on this page :
https://docs.flightsimulator.com/html/Programming_Tools/WASM/WebAssembly.htm
Please let us know if something doesn’t work as expected or if additional
information is needed. Best regards, Eric / Asobo
Thanks Eric, I will try tonight and provide feedback. Best, Raul
Hi Eric @EPellissier so I tried and it all
works: The only thing is the experimental tag is
a bit tricky to find, but after I figured out where this was located then I
made it work:
documentation made me believe I could be running Visual Studio in debug mode,
attached to MSFS and edit the code and continue (like you do for some apps in
developing mode with VS). Now that I have used the feature I understand the
meaning and that this is not the case. We are able to change the code in C++,
build in VS and then hit the recompile inside the WASM debug window, saving
the time to having to re-build and compile the entire airplane or add-on being
developed. Perhaps the documentation needs a bit of adjustment so people
understand the workflow: 1) If in VS debug mode, stop debug. 2) Change your
code in VS. 3) Compile inside VS and copy the new .WASM module to the package
source and the package build relevant locations. 4) Inside the WASM Debug
Window, click Experimental - >recompile. This process is much shorter of
course than compiling the entire add-on, it saves losing your flight, camera
positions, etc. so it is very much welcome!, YES!!. Now, I don’t about the
technical limitations and if it could be posible, but it would be brilliant if
we could put a post build process command inside Visual Studio that could
trigger MSFS to re-compile the WASM module just like via the WASM debug
window, this way it could save the time to find the WASM window, etc. for
example: If this could be
achieved, then we would be able to just change the code inside VS, build the
VS project and just proceed to MSFS to test the changes, it would help to
expedite the developing process even further. Lastly many thanks the entire
Asobo team for implementing this new experimental feature, it really does make
a different to be able to work faster. Best, Raul
Hi, You are right, maybe the documentation could be clarified @Nocturne. About
the “copy to PackageSource” part, you don’t need to do that. You can actually
skip your third point ( Compile inside VS and copy the new .WASM module to
the package source and the package build relevant locations. ) , and it
should work the same. The new wasm file will be copied to a specific folder
next to your dll and used to recompile the first one. Best Regards Maxime /
Asobo
Hi Maxime, I have that as part of the build process anyway since it ensures it
copies the wasm gauges to the panel folders of the product. Once again thanks
for this new feature, It really helps, I was tweaking custom prop feathering
and propeller handling last night without having to restart the flight on each
change. What a bliss it was in comparison with before!. Best, Raul