“Using the Debugger”

This is sentence from the wiki is very unclear to me:

If a macro is paused, or if a macro starts paused, but the next action is a Debugger action, it will run anyway. This allows you to to create macros with hot keys and Debugger actions to breakpoint, step through, continue, etc other macros without themselves being debugged.

Breaking that down…

If a macro is paused

– by a pause action, yes?

or if a macro starts paused,

– because the first action is a pause action?

but the next action is a Debugger action, it will run anyway.

= Any kind of debugger action will run (or continue to run?) during and after a pause?

This allows you to to create macros with hot keys

How are hot keys relevant?

and Debugger actions to breakpoint, step through, continue, etc other macros

What have other macros got to do with it?

without themselves being debugged.

= without those macros being analysed or interrupted by the debugger?

Could someone please rephrase this convoluted sentence? I’m sure the intended meaning must not be too complex but I’m somewhat baffled by that wording.

I think by the Debugger, via either the "Pause New Macros" or the "Breakpoint All Macros" Action.

I think (again!) that the whole paragraph is about "How can I run other macros while debugging?" -- you might have a hot-keyed macro that "Debugger Continue All Macros", for example, so saving you having to click "Continue" on multiple instances in the Debugger UI. If the "Continue" macro's first (or only) Action is "Debugger Continue..." it will avoid "Pause New Macros".

2 Likes

Thank you, @Nige_S. I shall just get stuck in and see what happens. :rofl:

@peternlewis, it seems that I am not the only one who is unclear about the intended meaning of that section, so could we flag it for rewording some time? Thanks!

1 Like

I think this little Group demos what I mean.

Debugger Demo Macros.kmmacros (6.0 KB)

Run "Setup" to open the Debugger then spawn 5 async instances of "This executes...", which will immediately be paused for debugging.

Run "Bad Flush", which starts with a "Calculate" Action, and you'll see that gets paused too -- even though the second Action is "Debugger Continue All Macros".

Run "Flush", which starts with "Debugger Continue All Macros" then does the "Calculate", and all instances will run to completion -- "Flush" doesn't appear in the Debugger, doesn't get paused even though it is also a new macro, because it starts with a Debugger Action.

1 Like

Many thanks for that. So I can see that any (instance of a) macro that is launched after Debugger New Macros Paused will be paused until Debugger Continue All Macros runs.

Your macro names “flush” and “bad flush” refer to flushing out KM’s memory of macros that have been paused by the debugger—yes?

I have clarified it as paused by the debugger.

I'm not sure if any other changes are desired.

1 Like

Sorry, badly named. They both "Continue All Macros" that are held paused by the Debugger -- the equivalent of pressing the "Continue" ("play") for every instance in the Debugger window.

The important bit is that "Bad Flush" starts with a "normal" KM Action so it goes into the Debugger and you must press the Instance's "Continue" button for it to run. But "Flush", containing the same Actions but with the Debugger-targeting Action first, is ignored by the Debugger and runs without interference.

1 Like

Thank you, yes, I got that but just wondered about terminology/naming. :+1:

1 Like