It is much better to use Docker/VirtualBox/Vagrant to replicate the remote server, if it is impossible to replicate the environment on your own machine.
Debugging a live server is not very smart, to put it mildly.
I have already understood what happened to me when a project went into production. Some assets that developers write validate if it is in debug mode or not to modify which resource should be published, in my case I had a widget that needs to be modified. This is the case https://github.com/coderius/yii2-lightbox2-widget/issues/2 .