Getting Chrome's console.log to display the line that called a function

后端 未结 2 1709
悲&欢浪女
悲&欢浪女 2020-12-21 23:10

Is there any way in the Chrome Console tab to display the address that called a function?

I have a function that\'s being called but I don\'t know where from. I know

2条回答
  •  眼角桃花
    2020-12-21 23:41

    The answer to this question might be what you are looking for.

    It uses the trick of throwing an exception, then accessing the LineNumber property and printing it.

提交回复
热议问题