I can debug my PHP scripts using Aptana 3.4. In "Debug Configurations" I simply choose "Use specified script" and when I run that script in Firefox, it automatically breaks in Aptana.
我可以使用Aptana 3.4调试我的PHP脚本。在“调试配置”中,我只选择“使用指定的脚本”,当我在Firefox中运行该脚本时,它会自动在Aptana中中断。
Now I'd like to know if it's possible to automatically break without explicitly loading the script: for example I open "index.htm" in Firefox, that contains some jQuery which does an AJAX call on "GetList.php". Is it possible to add a breakpoint in "GetList.php" and have Aptana break on it after opening "index.htm" in Firefox?
现在我想知道如果不显式加载脚本,是否可以自动中断:例如,我打开“索引”。在Firefox中,它包含了一些jQuery,在“GetList.php”上执行AJAX调用。是否可以在“GetList”中添加断点。php“打开后,Aptana打开”索引。在火狐htm”吗?
1 个解决方案
#1
3
Yes, this should be possible with some help from a browser extension. Xdebug will initiate a debugging connection when either the IDE appends the ?XDEBUG_SESSION_START=1 GET parameter, but also when a cookie with the same name is set.
是的,在浏览器扩展的帮助下,这应该是可能的。当IDE附加了?XDEBUG_SESSION_START=1获得参数时,Xdebug将启动一个调试连接,但也会在设置相同名称的cookie时启动调试连接。
The list at http://www.xdebug.org/docs/remote#browser-extensions lists extensions for each browser that allow you to set such a cookie. Xdebug notices that cookie and initiates a debugging session and as long as Aptana (or any other IDE) has an open listener for debugging connections this should work fine. THe documentation at https://jira.appcelerator.org/secure/attachment/26405/ServerPHPDebugging.pdf (page 5) explains how to set this up as well.
在http://www.xdebug.org/docs/remote#浏览器扩展列表中列出允许您设置这样一个cookie的每个浏览器的扩展。Xdebug注意到cookie并启动一个调试会话,只要Aptana(或任何其他IDE)有一个打开的侦听器来调试连接,就可以正常工作。在https://jira.appcelerator.org/secure/attachment/26405/serverphpdebug .pdf(第5页)的文档说明了如何设置这个。
#1
3
Yes, this should be possible with some help from a browser extension. Xdebug will initiate a debugging connection when either the IDE appends the ?XDEBUG_SESSION_START=1 GET parameter, but also when a cookie with the same name is set.
是的,在浏览器扩展的帮助下,这应该是可能的。当IDE附加了?XDEBUG_SESSION_START=1获得参数时,Xdebug将启动一个调试连接,但也会在设置相同名称的cookie时启动调试连接。
The list at http://www.xdebug.org/docs/remote#browser-extensions lists extensions for each browser that allow you to set such a cookie. Xdebug notices that cookie and initiates a debugging session and as long as Aptana (or any other IDE) has an open listener for debugging connections this should work fine. THe documentation at https://jira.appcelerator.org/secure/attachment/26405/ServerPHPDebugging.pdf (page 5) explains how to set this up as well.
在http://www.xdebug.org/docs/remote#浏览器扩展列表中列出允许您设置这样一个cookie的每个浏览器的扩展。Xdebug注意到cookie并启动一个调试会话,只要Aptana(或任何其他IDE)有一个打开的侦听器来调试连接,就可以正常工作。在https://jira.appcelerator.org/secure/attachment/26405/serverphpdebug .pdf(第5页)的文档说明了如何设置这个。