So I'm now using the version of Angelscript that is in vcpkg. It works great in release mode, but as soon as I get into debug mode I get some pretty wild effects. In particular, when I run the following script:
void main() {
try { throw ("Hello"); }
catch { Log ("world"); }
}
In release mode this works fine: it logs "world". But in debug mode the exception escapes the engine entirely (Execute() does not return asEXECUTION_EXCEPTION), ending up in my catch-all exception handler instead. Afterwards the engine appears to believe that the script has terminated; if I ask it to abort the script I get "Failed in call to function 'Execute' (Code: asCONTEXT_NOT_PREPARED, -4)".
I don't remember seeing this problem when I was compiling angelscript myself, so it could be something specific to the version in vcpkg, or the way it is compiled. Uhm, any idea what could be going wrong?