-1

I have a variable join in a page whose value is either true or false.

When I run the page, how can I know which method modified the variable using the debug tool in chrome?

Pokechu22
  • 4,984
  • 9
  • 37
  • 62
jason zhong
  • 101
  • 1
  • 9

1 Answers1

0

Use the debugger keyword in your code. This is the equivalent of setting a breakpoint in a debugger. When the browser hits the debugger the program will stop and you can inspect the stack trace from the dev tools.

Read this on debugging javascript.

jmaloney
  • 11,580
  • 2
  • 36
  • 29