core icon indicating copy to clipboard operation
core copied to clipboard

Debug statements inside macros prints immediately when read

Open karoria opened this issue 2 years ago • 3 comments

Hi @terjeio I noticed that (debug,________) statements inside any macro file prints immediately when they are read by planner and not when they are actually executed. I mean they are out of sync and hence doesn't solve the purpose of debugging. Am I missing something or there is work in progress in this matter? Regards, Ravi

karoria avatar Dec 22 '23 07:12 karoria

For now add a short G4 delay before the debug message. I'll consider adding it to the data sent downstream to the planner/step execution later but it might be a bit complicated since, for motion commands, there can be many line segments that has to complete before the message can be output.

terjeio avatar Dec 23 '23 10:12 terjeio

Ok. Does a G4 delay make the debug statements synchronous with previuos and next commands? In which cases adding G4 delay might help?

karoria avatar Dec 25 '23 18:12 karoria

Yes, try G4P0.1 for a 100 ms delay.

terjeio avatar Dec 25 '23 18:12 terjeio