JS coba tangkap err.printstacktrace

try{
  //some error
} catch (err){
  console.log(err.stack);
}

Busy Boar