简体   繁体   English

PHP和Javascript-记录完整的工作流程

[英]PHP and Javascript - log complete workflow

I am working in a complex Webframework with lots of Javascript in the Frontend and lots of PHP in the backend. 我正在一个复杂的Webframework中工作,前端有很多Javascript,后端有很多PHP。 Since I'm new to it, finding out the workflow is quite a hassle. 由于我是新手,因此找到工作流程很麻烦。 Is there a way to log the complete sequence of function calls (in PHP, JS or both) from the moment a request is sent until the response is executed (or the JS after the request has been sent is executed?) That would be really helpfull. 从发送请求到执行响应(或者发送请求后的JS执行)之间,是否有方法可以记录完整的函数调用序列(在PHP,JS或同时在两者中)?有帮助的。

There's no perfect solution here but you will probably have to just use browser debugging tools like Firefox's Firebug or Chrome's debugger . 这里没有完美的解决方案,但您可能只需要使用浏览器调试工具,例如Firefox的FirebugChrome的调试器 Using these tools you can see JavaScript errors, AJAX requests, PHP (server) responses, individual page file loads etc etc. 使用这些工具,您可以看到JavaScript错误,AJAX请求,PHP(服务器)响应,单个页面文件加载等。

All I can think of would be using Chrome developer tools, network tab in order to see the sequence of events. 我所能想到的就是使用Chrome开发者工具的“网络”标签来查看事件的顺序。 Or maybe even better, the HTTPFox plugin in firefox. 甚至更好的是firefox中的HTTPFox插件。 That will help you to find out the execution order of JS calls and which PHP files are accessed via AJAX. 这将帮助您找出JS调用的执行顺序,以及通过AJAX访问哪些PHP文件。

What's happening on server side isn't easy to follow, but you could debug your code using XDebug . 在服务器端发生的事情并不容易理解,但是您可以使用XDebug调试代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM