As far as I know this is not possible because any code that you run is executed in a sandbox environment and you loose cannot set breakpoints or debug the code.
It would be very nice to have something like this.
I agree with @vdespa.
Something you can do if you’re having an issue is to do so console logging. Just dump your variables in a console.log statement.
Open up the console (Ctrl + Alt + Q) and view your logs.