Can we get better debugging tools to deal with exceptions? Currently all we get is “WASM: Exception xxxx in gauge XXX in module vfs://xxxx”. It would help alot if we can get:
Callstack trace and dumping.
(If possible) Source File Line numbers of each callstack frame.
Break when debugger is attached, instead of just a message in the console.
Everything you have just described is already available in the sim since MSFS2020. You can attach a debugger, put breakpoints, break on specific exceptions, navigate through the callstack in your c++ sources (not in the dll assembly)… An Edit & Continue is also available so you can change some parts of your code during its execution without having to restart.
Here are some links that can help you with debugging :
When the exception message appears in the console, it can appear on our customers computers, which we have no access to.
Hence, a callstack trace and source file line number that can be printed together with the wasm exception in the console will be helpful - thats point 1 and 2.
Point 3 . When a debugger is attached to the sim, I have experienced cases where the sim will just silently print the exception in the console without getting a debug break() trigger, hence I will have zero idea where in the call stack that exception came from. (Yes wasm file was compiled as debug and file type is debug)
Does the above clarify what my intentions are for the post? The current debugging tools are really insufficient. WASM devs do not have the luxury of crash dumps to collect from customers pc.
In my experience this only happens when your debugger is not properly configured to catch all Exceptions (make sure you check all of them in the “Exceptions” tab of Visual Studio) - have you experienced anything different?
Including a call stack in the error message can only be done if you provide your customers with Debug modules, which is forbidden in the Marketplace - so this will only be feasible with your beta testers. This is something we may try to work on in the future but there is no ETA at this stage: