Whenever your iframe content is loaded, you can select any included script file from the drop down box located right under the toolbar, close to the vertical splitter.
I have placed a red frame around it on the picture.
When your script is loaded into the left panel, you can debug it with the usual tools: breakpoints, F10 / F11 etc.
See