Question

Is there any way to specify the debugger for listening for specific method names? Example: When the function myFunc get called, I want to start debugging. Yes, I know that this seems strange, but in some projects I don't know the name of the javascript file to start the debugging, but I do know the name of the method.

It would be something like the Event Listener Breakpoints, but with an arbitrary method name instead an event name.

Was it helpful?

Solution

You can find the function name with a search and set the break point. You can use the following key combination to search accross the files.

  • Windows: ctrl+shift+F
  • OSX: Cmd + Opt + F

enter image description here

OTHER TIPS

Just wanted to add another method that I came across today while searching, you can open the JS console and use debug(Some.path.to.myFunc) and it will set a debug breakpoint on the function. Use undebug(func) to unset it. You can also use monitor(func) and unmonitor(func) to get a console log when that function is called. Learned about these from: https://amasad.me/debugging

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top