Pause print at end of layer

I’ve got a print running which isn’t going terribly well, but not so badly that I’m going to abort it.
It did occur to me that I could stop the print, re-slice the model, then recommence from the point where it was stopped.
I think that would be significantly easier if it could be stopped at the end of a level, rather than at some random point.
Is there any way to do this?
It’s also occurred to me that this question might be better on the Octopi forum, but I’ve started, so I’ll finish.

You should insert a pause in the slicer at layer change.

Can’t do that once the print is running… At least, I don’t think we can.

What slicer do you use?

Usually Prusa, but the point here is that a print went a bit wrong, and I wanted to stop it at that point and carry on…
If I had known in advance that it was going to go wrong, I could have inserted G-Code, but I don’t think it can be done while it’s actually printing the file…

Or maybe you can: I just tried, and it seems to have worked.
Pause it first, else it gets confused.