How to debug JavaScript code that I paste into Developer Tools Console in Firefox?

I know how to debug JS code, that is present on the bage when you load it. Now I would like to apply changes to the page and I need to debug a big chunk of JS code that I paste into console.

I tried to add debugger and run the snipped. It didn’t work out. Also I can not find anything that is my code related in the debugger tab of DevTools.

Is it even possible and is it possible in an anonymous function particaly? I don’t want to add extra on click handlers or something like that.

enter image description here