This is a question that has come up a couple times. I agree that would be nice in some cases, but it would be extremely difficult. For example, here is some code you can run in your script window:
#define MSG_RESUME_UTILIZE_STATE 5
#define DO_MATH 11 / 2
int w = MSG_RESUME_UTILIZE_STATE;
int x = DO_MATH;
int y = x;
int z = w;
return x;
In this case, w, x, y, and z all have the value 5. It is more helpful for the debugger to show that the value of x is 5, and not 5.5. If the debugger showed DO_MATH, the user might never realize that they had lost the decimal portion of the value, which is one of the purposes of the debugger.
Additionally, we would need to make a way for the debugger to differentiate between all of the 5's it encounters. There are more than 60 macros in FlexSim that produce the value 5, and not all 5's in FlexScript are derived from a macro. So when the debugger sees a 5, it would need to somehow know that this particular 5 came from a macro in the first place, and which macro it came from. That information is currently discarded during the build process. Keeping it would mean a monumental increase in memory use, and a decrease in FlexScript performance.
For these reasons, it is unlikely that this feature will come out any time soon. Even in C++, that is the cost of using macros; they are easy to use, and they can simplify your code, but they are difficult to debug.
.
Jordan Johnson
Principal Software Engineer
>