[xdebug-general] Re: XDEBUG_CONFIG and reading source files

From: Derick Rethans <derick[@]xdebug.org>
Date: Tue May 04 2004 - 09:41:28 CEST

Hello Blake,

On Mon, 3 May 2004, Blake Schwendiman wrote:

> I have two questions. The first is a result of simply trying to get the
> debugger (ver 2.0.0 debugclient in DBGp mode) to stop. Apparently I have to
> set an environment variable (XDEBUG_CONFIG) to something in order for the
> magic_cookie variable to be set (CLI mode) which is a prerequisite for the
> debugger to "kick in". Is that right?

Yes, you can also configure some options here, like:

derick@kossu:/dat/dev/php/xdebug$ export XDEBUG_CONFIG=remote_enable=1\
remote_port=9000\ remote_host=127.0.0.1

derick@kossu:/dat/dev/php/xdebug$ set | grep XDEBUG
XDEBUG_CONFIG='remote_enable=1 remote_port=9000 remote_host=127.0.0.1'

> The second is more like a suggestion than a question. The function
> fd_read_line_delim in usefulstuff.c never finds the delimiter if it doesn't
> exist at the end of the source file:
>
> while (context->buffer_size < 1 || context->buffer[context->buffer_size -
> 1] != delim) {
>
> I generally do not place any characters after the ?> in my PHP scripts, so
> this function doesn't work correctly when I'm using a small file that does
> not have a "\n" at the very end. If I add the "\n" to the file, then
> everything is fantastic. Related to this, I've noticed that the
> return_source function reads 0 - 999,999 times even if the entire file has
> been exhausted after just a couple of lines.
>
> I have some other things that I need to do right away, but if I get a chance
> and I haven't heard from you, I may try to patch these last two items later.

Okay, I'll have a look if I find some time this week.

regards,
Derick

PS: Please use a subject in your mails.
Received on Tue May 4 09:41:58 2004

This archive was generated by hypermail 2.1.8 : Fri Jul 04 2008 - 21:00:10 CEST