index code debug