Often I will make use of the “Interactive Script Tester” (Tools>Advanced>Script Playground) when debugging code. There, I can do just about everything I can do in any script.
There’s just a little more overhead to get references to components. I usually have to use code like the following to get needed references:
from fpmi.gui import getWindow
window = getWindow("Window Name")
component = window.rootContainer.getComponent("Component Name")
...
Once I have the required references, I then experiment by entering code into the buffer and clicking Run Buffer.
When I have refined/determined the code I need, I just highlight the code in the upper third of the Script Tester (i.e., History) and press to copy it to the clipboard. I then paste the code into an action script and eliminate/clean up any component references and am good to go.