简体   繁体   English

NetBeans + xdebug:每次启动调试器时如何重新启动PHP会话?

[英]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.

相关问题 如何延长我的 Xdebug “会话时间”? - How do i extend my Xdebug “session time”? 为什么我不能在日食中选择xdebug作为php调试器 - why I cannot select xdebug to be php debugger in my eclipse nginx php-fpm xdebug netbeans只能启动一个调试会话 - nginx php-fpm xdebug netbeans can start only one debug session 我可以在异常时使xdebug停止\\中断吗? (Ubuntu / Netbeans IDE / PHP 5.4 / CLI / xdebug) - Can I make xdebug stop\break on exceptions ? (Ubuntu/Netbeans IDE/PHP 5.4/CLI/xdebug) 如何在php中启动会话和重定向? - How can I start a session and redirect in php? 如何启动session_start(); 在PHP中调用每个静态方法之前? - How can I initiate session_start(); before every static method is called in PHP? 我在xdebug会话中哪里可以找到常量? - Where can I find constants in my xdebug session? 我可以在每个页面的开头使用session_start()吗,即在我网站的头文件中 - Can i use session_start() at the start of every page i.e in the header file of my website Xdebug 无法连接到客户端,从哪里开始调试调试器? - Xdebug unable to connect to client, where do I start debugging the debugger? PHP Netbeans:xdebug在每个include()或require()上停止 - PHP Netbeans: xdebug stops on every include() or require()
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM