Screencapture produces a rectangle but no copied image in Script Debugger

Script Debugger v.7.0.12 is presenting a problem with screencapture, that I cannot solve.
The following applescript produces a tan rectangle, that appears to be the the size of the drawn mouse coordinates, when screencapture is called via “do shell script”

set screencaptureSh to "/usr/sbin/screencapture" & " -ci" 
do shell script screencaptureSh

This undesired tan rectangle, also lacks any captured image from the screen.
The same screencapture command works with no tan rectangle but with a captured image:

• when called in Terminal, as /usr/sbin/screencapture -ci
• when called by a combination of keyboard commands {command, shift,4} in any application
• when called in Script Editor, with the same applescript code

I checked Script Debugger’s preferences, but found nothing that appeared to cause this rectangle box to show, or to prevent capturing the screen image.

Might Script Debugger

  1. require a preference be unchecked?
  2. require a preference to be checked?
  3. trigger some an application or unix code when screencapture is called with the do shell script command?

The system should have prompted you to give Script Debugger access to Screen Recording in Security & Privacy preferences.

Thank you, Shane. Is there any method, by which I might have detected that lack of permissions in Security & Privacy?

Not that I know of. As a general principal, security features deliberately eschew such things as arguably a security weakness in themselves.