How to log a global variable in the debugger

I have a flywheel velocity global variable defined in my code and would like to be able to log that variable versus system time in the debugger data logger. Can this be done? If so, any tips would be greatly appreciated. When I try to define a series, I don’t see anywhere that I can select user defined variables…

Thanks in advance!!!

You need to log global (or local) variables using code. For example,

This will add an entry in the datalog series 2 for global_2. See the sample code in Advanced/datalogging.