Debugger not able to handle header() calls? |
Site Admin
|
While it's unclear from your post, I assume that the header() function is called with a properly formed string like this:
header("Location: http://myserver/mynewdir/mynewscript?myvars");. Anyways, please check it first. Then you'd understand that instead of what you expected, header location does not make your web browser switching to target url immediately. It gets full the content and then re-requests new page by opening a new connection which means that you will get or will not get a new debug session, depending on if you sent appropriate debugger request or not. As far as I see you do not use any requests, but DebugBreak() function call. It's not a very convenient way. What IDE do you use ? If you need an IDE that supports multisession debugging you'd give phped 3.3 a try. |
||||||||||||
|
output_buffering helps |
|
I have been having similar problems with debugging across header("Location: . . .");
I realized today that enabling output_buffering was part of the problem. My pages have an include to a sitewide common header (include("/_include/ch.php")) which starts output buffering as its first action. However, that buffering does not seem to be operating inside a debug session on my Windows workstation. So -- I turned on the output_buffering directive in php.ini and voila, output buffering is working just fine in my debugging sessions. Just for the record, the reason this makes a difference to the header("Location: . . .") command is that you cannot send headers after output has already been started on a page. If you have any time of output happening before the Location header is sent, it will be ignored. So -- before I issue a header("Location:") I always issue a ob_end_flush() or ob_end_clean() -- just in case. See http://www.php.net/header And thanks to nusphere for coming up with a terrific product and a good support forum. -jm |
||||||||||||
|
Debugger not able to handle header() calls? |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by