title: How would one monitor JavaScript execution in a web browser programmatically?
body: <p>I would like to be able to know when arbitrary JavaScript successfully executes a command in a web browser. The medium doesn't matter, it could be a log, stack trace, event signal, it just has to be something that can be programmatically analyzed. </p>
  
  <p>I've thought about this problem for some time now and I have not been able to come up with an adequate solution. I'm no expert with JavaScript though, so I'm wondering what ideas you have? </p>
  
  <p>Since you'll probably be wondering why, it's just something I'm very interested in.</p>
  
  <p>Any input is appreciated. Can you help me?</p>
  
  <p>EDIT: I've investigated using something like Firebug to monitor JavaScript functions, however I wasn't able to determine if Firebug can be run programmatically on a simulated Web Browser (like a web-browser control in ASP.NET, which is what I'm currently using.) Does anyone know if it can?</p>