I need to debug Appium, is it difficult?

No really! Appium is a NODE.JS application, so it is Javascript in the essence. The code is available on GITHUB and can be downloaded in a few seconds as it is small and not so complex.

Depending on what you have to debug, you will probably need to go deeper in your debugging experience, however, there are some key points were setting a breakpoint is always worth: the proxy component is worth a mention. In appium/lib/server/proxy.js you can set a breakpoint in function doProxy(req, res), that will be hit every time commands are sent to platform-specific components to be translated into automation commands.