Calling the trace function in javascript (facebook)

I am trying to create a Chrome extension that can be used to automatically reply in Facebook chat. My idea is to override the receive and send (ajax) functions and act on their call. But I have a problem. I cannot find out what features are used to send or receive chat messages. I tried to track Ajax calls, but I just can't find a way around my scrambled and overly complex JavaScript files (which have very strange names).

So can you suggest me a way to track function calls? I can’t find a way to rally the debugging and really don’t know where to start with breakpoints.

+4
source share
1 answer

So can you suggest me a way to track function calls? I can't rally find my way around debugging, and really don't know where to start from breakpoints.

It is actually easy to debug and track javascript in google chrome . A quick google search will tell you more. Just hit CTRL + SHIFT + J to get developer options in google chrome. Then go to your call and execute the stepinto or stepover . You can use the stack trace option to help you. I stuck an idea for an idea.

Google chrome debugger

The same thing can be done in firefox using firebug

EDIT

I tried, but I can not find a way around them. I tried to trace the line where a function is called that requires an Xhttp request, but no luck there.

To track AJAX calls, you need to add breakpoints to your callback functions; The callback function will receive the breakpoint called when they are called.

+3
source

Source: https://habr.com/ru/post/1393537/


All Articles