Well I almost got it to work... turns out we need a stringize macro operator to make everything work
the macro should be:
#define NEWVAR(type,name,tbtype) type name; #define debug_##name ce_adddebugvar(&name,dbtype,#name)
You would define a global like:
NEWVAR(int,foo,ce_debug_int)
then later in the code in a function could call
debug_foo;
This would add the variable pointer to the console to be viewed and modified. but the problem is we don't have an # operator in macros in lite-c The solution I came up with for now is to just include a quoted copy of the name as an additional parameter. The real solution may just be to write a preprocessor for lite-c as a separate program. I think I have some source from about 20 years ago that would be a good starting point....