If you dislike debugging in KM then there is a new utility waiting to make your life less stressful... now go to the How Do I Get It? section at the end. If you have a few minutes - keep reading!
In fact, I can see from the forum that some other users feel this way too.
I've now been using KM since beginning of 2014 and while my knowledge of KM and skill at constructing macros has increased and improved from the beginning, my debugging skills have remained more or less at a standstill.
This is not meant to be a criticism of KM - which I love - but more a reflection on the "visual programming" paradigm that presents obstacles to reading, structuring, maintaining and debugging code.
Virtually all of my debugging activities involve adding Display Text or Notification actions at strategic points around my macros to see what is happening with my variables and what path is being taken through the macro logic. Then on discovering something, I have to add more Display Text actions, remove existing ones and try again - hoping for the best.
And then, while the macro's running, all these Display Text windows pop up and hang around and obscure what's going on behind them and heaven forbid that I want to do some GUI manipulation at the same time!
Using notifications is unhelpful - they just don't display enough information. And neither does the in-built KM debugger - it really doesn't show the information I need to see and I personally have a lot of trouble getting it to work.
It all really is difficult, tedious and tiresome for me. Hey - the time I save automating tasks with KM is sometimes almost negated by the time I spend setting up and doing debugging!
So I decided to do something about it.
I developed the Checkpoint System .
It's a tracing/breakpointing system that lets you
- observe any variables and values in your macros that you want in real time ;
- start/stop macro execution at points you determine;
- see the path taken through nested macros and submacros (breadcrumb trail );
- record all this stuff in a log file that is also optionally on display and updated in real time for detailed analysis.
The Checkpoint System is implemented as follows:
- Three KM plug in actions that do all the hard work for you.
- A set of utility macros accessed through a simple menu to make using the Checkpoint System even easier.
In addition it comes with:
- Comprehensive documentation.
- Demonstration macros to help you get started.
- You can use the Checkpoint System in "headless mode" which allows the correct operation of GUI-related macros and does not get in the way of them but still records everything in the log file so you can later analyse what went on.
- You can choose precisely the granularity and level of detail you want to see.
- You can have visibility over all variables - global, instance and local.
- It provides single mouse-click control over the scope of tracing/breakpointing.
- It's pretty intuitive to use.
You might consider using the Checkpoint System when your macro isn’t working as you expect and the macro:
- manipulates/changes data and you’re unsure about how/what it is actually doing with the data;
- gets data from various sources and you are not confident that the right data is being obtained;
- calls (executes) other macros;
- has many actions;
- has many “decision” points – such as If…Then actions, for example – meaning the logic in it is complicated;
- keeps misbehaving and you’re tired of putting Display actions in your macro and dealing with multiple display windows that get in the way, or even missing display notifications that disappear too quickly and don’t show all the information.
Or you might just want a quick, easy and flexible way to look at the variables in your macro.
The Checkpoint System consists of both third party plug ins and KM macros and you need to follow the instructions in the User Guide to install it properly. It's not hard to do, but it's not just a double-click either.
Here is the User Guide:
Checkpoint for Keyboard Maestro - User Guide.pdf.zip (1.2 MB)
Download it and then unzip it. Read it through and if you think the Checkpoint System is something that you could use, just send me a Private-Message asking for it and I'll send you the installation file.
Before you ask why this way - here's the answer: I'm doing it this way because
- I want to know how many KM users have the Checkpoint System
- I want to minimise the time I spend on support
I hope you've found this interesting!