-
Notifications
You must be signed in to change notification settings - Fork 1
Debugging
Cleve Littlefield edited this page Feb 1, 2016
·
1 revision
Debugging is easy with Mata. Just like the EmitDebugSymbols global property (defaults to false):
MapEmitAssembly.EmitDebugSymbols = true;
With this setting on, Mata will output a cs approximation of the code it is running to your app's working directory, and emits debug symbols into the module.
So when you reach a call on IMap (Load, LoadOrdinals, LoadParameters) that you want to troubleshoot, just Step Into. VS will ask you where the file is, just navigate to the working directory (after you do this once VS will find it by itself from there on out). You can step over/into the lines that mata is running and even set breakpoints.
Notice your breakpoint is only good for the current session, as the Mata generates a new module with a new name each time.