[xdebug-general] AW: Re: AW: Re: Find out whether breakpoint is valid

From: André Hänsel <andre[@]webkr.de>
Date: Tue, 28 Apr 2009 05:58:23 +0200

Derick Rethans wrote:
>
> Yes, it is... and it reads:
>
> 203 - no code on breakpoint line (the IDE tried to set a breakpoint
> on a line which does not have any executable code. The
> debugger engine is NOT required to return this type if it
> is impossible to determine if there is code on a given
> location. (For example, in the PHP debugger backend this
> will only be returned in some special cases where the current
> scope falls into the scope of the breakpoint to be set)).
>
> I would like to support this though, but it's a bit tricky cause I can
> only test for the code, when the file is actually loaded as (part of a)
> running script already.

Oh, at first I did not understand the last sentence. That's bad. Especially because of the strange places for valid breakpoints: Look at the example mentioned earlier or at this (longer) one:

        $content_array = array(
                array('html_l' => df_lang('Status:'),'html_r' => form_db_field(array('field' => 'status')+$valuelist)), // Here!
                array(
                        'html_l' => df_lang('Type:'),
                        'html_r' => form_db_field(array(
                                'field' => 'type_id',
                                'reference_name_field' => 'name'
                        )+$valuelist)
                ),
                array(
                        'html_l' => df_lang('Realm:'),
                        'html_r' => form_db_field(array(
                                'field' => 'realm_id',
                                'reference_name_field' => 'name'
                        )+$valuelist)
                ),
        );

So what's the rule? "In every multi-line array construction, the only valid breakpoint is in the line after the assignment operator"?

In exchange we get valid breakpoints on lines with function headers. That doesn't make sense to me neither, because the functions are already parsed and (literally) functional - there is no code executed when a function definition is hit, is it?

Or am I getting something wrong when setting my breakpoints?

Regards,
André
Received on Tue Apr 28 2009 - 05:58:37 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST