snippets for debugging js api talk