Can you pause unity playmode while mouse button is down?

I’m currently experiencing a bug where if I have the left or right click mouse button down, Ctrl+shift+p will not pause Unity’s playmode. I’m trying to debug a situation where I am dragging UI objects. How can I get the pause hotkey to work properly with mouse buttons down?

Try using Debug.Break(); in your code. See answer from user Blah on this question.

Set the Time.timeScale variable to 0 (zero), that will pause everything that are frame rate independent. Remember, if you lower timeScale it is recommended to also lower Time.fixedDeltaTime by the same amount.

To return to normal speed, set the Time.timeScale to 1.

Read more in the timeScale documentation.

If you are working in editor view, the you can use the Debug.Break function as well to pause your game.

Read more in the Debug.Break documentation.

Good luck!