martomo / SublimeTextXdebug

Xdebug debugger client for Sublime Text
MIT License
564 stars 89 forks source link

Breakpoint not hit on redirect #129

Open noelfarrugia opened 9 years ago

noelfarrugia commented 9 years ago

Operating System: Windows 8.1 64bit Sublime Text 3

Project Settings: { "folders": [ { "follow_symlinks": true, "path": "C:\xampp\htdocs\Website" } ], "settings": { "xdebug": { "url": "http://localhost/Website/", } } }

Xdebug configuration: [XDebug] zend_extension="C:\xampp\php\ext\php_xdebug.dll" xdebug.remote_enable = 1 xdebug.remote_host = "127.0.0.1" xdebug.remote_port = 9000 xdebug.remote_handler = "dbgp" xdebug.remote_mode = req xdebug.remote_autostart = 1

Hi,

I have a problem when I want to debug a webpage which was called from a header function. For example, I have a simple login system, where on successful login it redirects the code to the page "welcome.php" (a sample code is given below). I set a breakpoint on index.php ( the starting page ) and one in welcome.php. The breakpoint in index.php is being hit, however the breakpoint in welcome.php isn't. I tried this in JetBrains PhpStorm and both breakpoints are being hit. Any help would be greatly appreciated.

if($_SERVER['REQUEST_METHOD'] == "POST") { $user = new cUserLogin();

if ( $user->login( $_POST ) )
{
    $_SESSION["userId"] = $user->getUserId();
    header("Location: welcome.php");
}

Do not hesitate to ask me for more details or if anything isn't clear.

Thanks a lot :+1:

Regards,

Noel

ghost commented 9 years ago

No help? I also have this problem and no clue.