Pry in a Script I Didn't Execute

How can I use Pry without calling the scripts directly?

I’m a ruby noob, and I’m trying to learn how to use Pry. All of the
youtube videos out there are using Pry by executing the script in
question directly in IRB. I’m trying to troubleshoot a sophisticated
event driven application. How can I use Pry in this scenario? I can’t
just execute the scripts from the command line and expect them to work
like they do in reality.

Thanks!