First, always debug an uncompiled version of Emacs-Lisp if you are not sure if the problem is in the byte compiler.
Secondly, if the code is hanging on Emacs, then the code is probably in an infinite loop with a non-closing non-closing lock. So, the first thing to do is go through the library source and change all the ban-exit links so that Cg works to stop the loop. After that, load the library, set debug-on-quit to t, and you should get a nice debug trace when you press Cg, which shows you where the loop is looping. From there, debugging a problem should be as simple as debugging any other infinite loop.
source share