Forget debugging please - for now. This is complicated, and will be rarely used at all. Most of the time all you need to debug is “print”.
If you want to play around with the API, then use the console, then write some small test scripts and print things. One thing after the other.
If you re new to programming, or Lua, or both, the Renoise API is really not a good thing to start with. Scripting is complicated. Pprogramming is. It never was meant to be easy. And most of the time it can not be.
I was in the same boat as you when I first started alpha testing the scripting and I have to concur with taktik about the difficulty of the task. However it is not impossible with patience and I feel I am progressing at a reasonable pace now.
For an overview of basic programming I found these tutorials useful. They are C and not Lua but a lot of the principles are similar for control structures etc.
(the rest of the series is listed on the right of the page)
There is also this basic Lua tutorial here (some spelling errors but the code seems good enough)