How can I use macros within a break?
I am currently debugging a piece of code relying heavily on macros. I am using breaks in the method to then check the values of macros and object properties as I go. However, any time I invoke a macro within a break I get an error. To get around this I am converting the macro calls into the underlying code. Some of these macros have messy translations and this is somewhat time consuming. Is there an easier way to access macros from within a break?
Comments
I have found a tentative solution in checking the compiled .int code and copying the resulting lines from there into terminal. It still would be helpful to know if there is a way to access the individual macros directly from within a break.
Are you using VS Code for your debugging? Or Studio? Or the command line?
I am specifically referring to using terminal/command line. Otherwise, the debugging tools offered by Studio or VS Code would be a decent solution.
Generally we can't execute the macros directly in terminal, studio output. The Macro preprocessor aka MPP do converts the marcos into the expression or function at the time of compilation. So, You can open and use the .int file for the specific code.
Test.mac
macromac
write$$$EnsMajorVersion;
Test.int
macromac
write$system.Version.GetMajor() ; Get the relevant value of macros and execute it in terminal or output window.
I had forgotten how the MPP works. Then outside of copying the compiled expression I cannot use macros in a break from a terminal session. Thank you!