This is a very useful feature, whereby you can check if your custom code is working or not, or the button is blocked by other OOB scenario.
Just append at the entity record’s URL end with ribbondebug=true to enable this feature.
There is a extra selection at the end of the ribbon which called “Command checker”.
From here, you can check for all the OOB and custom rules under Command Properties.
So for example, in Enable Rules, if you are getting all true, it means this button pass all the validations, if let say one of it become false, then it will not show the button.
For this feature, currently it is available on D365 cloud version.
I am not sure if latest on-premise version has this feature or not, drop a comment if you know that.