Add Debug class and fix buf ExtractLink not unique

*Fixbug extract link