gpt4 book ai didi

javascript - 在 javascript 中跟踪函数调用 (facebook)

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:05:33 24 4
gpt4 key购买 nike

我正在尝试构建一个可用于自动回复 Facebook 聊天的 Chrome 扩展程序。我的想法是覆盖 receive 和 send(ajax) 函数并响应它们的调用。但我有问题。我无法找出哪些功能用于发送或接收聊天消息。我试图跟踪 Ajax 调用,但我无法绕过它们杂乱无章且过于复杂的 JavaScript 文件(顺便说一下,这些文件的名称非常奇怪)。

那么你能建议我跟踪函数调用的方法吗?我找不到调试方法,真的不知道从哪里开始设置断点。

最佳答案

So can you please suggest me way of tracing the function calls? I can't rally find my way around debugging, and really don't know where to start with break points.

这真的很容易debug and trace javascript in google chrome .快速google search会告诉你更多。只需按 CTRL + SHIFT + J 即可在 google chrome 中获取开发者选项。然后转到您的电话并执行 stepintostepover 功能。您可以使用 stack trace 选项来帮助您。我附上了一张照片作为一个想法。

Google Chrome Debugger

通过使用 firebug 可以在 firefox 中实现同样的效果

编辑

I tried, but I can't find my way around them. I tried tracing the line where the function is called that requires the Xhttp request but no luck there.

为了跟踪 AJAX 调用,您需要在 callback 函数中添加断点;回调函数将在调用时触发断点。

关于javascript - 在 javascript 中跟踪函数调用 (facebook),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9047433/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com