[英]NetBeans + xdebug: How can I restart my PHP session every time I start the debugger?
I'm trying to debug a PHP website login system using NetBeans 7.0.1 and xdebug 2.1.0. 我正在尝试使用NetBeans 7.0.1和xdebug 2.1.0调试PHP网站登录系统。 I want to restart the PHP session every time I start the debugger (so that I'm always "logged out" when I go to debug).
我想在每次启动调试器时都重新启动PHP会话(以便在进行调试时总是被“注销”)。 I thought of creating a new PHP file with
<?php session_destroy(); ?>
我想用
<?php session_destroy(); ?>
创建一个新的PHP文件<?php session_destroy(); ?>
<?php session_destroy(); ?>
in it, so that I can restart the session each time I debug, but I'm wondering if there's a setting in xdebug to do this automatically. <?php session_destroy(); ?>
,以便每次调试时都可以重新启动会话,但是我想知道xdebug中是否有设置可以自动执行此操作。
Any ideas? 有任何想法吗?
不,Xdebug中没有设置或功能可以帮助您完成此操作。
If you want to load the login system files directly when you start the debugger, you could add the session destroy in the header and trigger it if a particular $_GET variable is set. 如果要在启动调试器时直接加载登录系统文件,则可以在标题中添加会话销毁并在设置了特定的$ _GET变量时触发它。
Then add that parameter to the URL you enter in the "Specify URL" window when you start a debug session. 然后,将该参数添加到启动调试会话时在“指定URL”窗口中输入的URL。
Be Well, 好吧
Joe 乔
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.