Debugging in Office Online (web browser versions of the Office products) is probably the simplest to use existing debug tools, and simply using F12 debug tools in IE, Edge, Chrome will give you access to the Console, DOM and inspection of HTML and CSS.
Desktop Office clients make it a bit harder since you can’t just start the F12 debugger tools because you are not in a full browser (like Edge or Chrome). Luckily Microsoft have provided a standalone version of the F12 tools (F12Chooser.exe) that you can use to attach to the running instance of the Desktop Office client.
Once you start talking about devices such as iPhones and iPads it begins to get even more difficult. Most documentation points you in the direction of Vorlon.JS which provides a good remote debugging experience, but involves a fair bit of setup, configuration and embedded scripts in your addin as well.
Firebug Console (iPhone)
Firebug DOM explorer (iPhone)