[core][js] better debugging info