Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can't you click on the filename/number on the right hand side? That works for me in Chrome. Source maps even allow it to open to the correct file inside Chrome.


I think they mean:

  function addStuff(a, b) {
    return a + b;
  }
  function logFunction() {
    console.log(addStuff);
  }
  logFunction();
And have it log out that `addStuff` is defined on line 1.


In Edge Dev Tools (so I'm sure it is similar in Chrome Dev Tools) it doesn't show source/line information in the log message directly (though it does have a link to the source line for the console.log message on the far right), but right-clicking a logged function includes a context menu choice for "Show function definition" which will jump to addStuff's declaration on line 1.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: