Small Icon in the Gutter - NOT a Breakpoint

Does anyone know the purpose of these grey-blue icons in the gutter?

Notably, they’re not breakpoints (the icon for those is larger), which can still appear normally on this line & are drawn behind this mystery icon.

The script above is nonsense, but shows a couple of the triggers for displaying the icon. Line 2 has the most common one I’ve come across – having code followed by a single line comment containing the » character.

I believe they show you that line was executed in the last run.

Run this script in debugging mode.

You’ll see that the lines that don’t execute don’t get that flag.

The ones that do execute do, and the more often they execute the bigger they get. They also change color.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
set y to 1
set z to 0
repeat with x from 1 to 10
	if x > 11 then
		set y to 10
	else
		if x = 5 then
			repeat with y from 1 to 50
				set z to z + 1
			end repeat
		end if
	end if
end repeat

Their official name is Code Coverage symbols. You can turn them on and off, and clear them, via the commands in the Script menu.

Full details are in Script Debugger’s Help.

1 Like