how to debug bugzilla? - Mozilla

This is a discussion on how to debug bugzilla? - Mozilla ; i'm an absolute newbie with perl so go easy on me. am trying to debug the Bugzilla/Bug.pm module and need to know the easiest way to debug it. just need to print out the values of some variables. have already ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: how to debug bugzilla?

  1. how to debug bugzilla?

    i'm an absolute newbie with perl so go easy on me. am trying to debug
    the Bugzilla/Bug.pm module and need to know the easiest way to debug
    it. just need to print out the values of some variables. have already
    tried using a simple 'print $my_variable' statement but can't seem to
    find where the standard output it going to. it's definitely not going
    to apache error_log!

    thanks,
    rick

  2. Re: how to debug bugzilla?

    Guten Tag rick.bryant@gxs.com,
    am Freitag, 3. Oktober 2008 um 20:25 schrieben Sie:

    > have already
    > tried using a simple 'print $my_variable' statement but can't seem to
    > find where the standard output it going to. it's definitely not going
    > to apache error_log!


    Use warn("some data:$my_variable"); and the message used to be saved
    in error_log.

    What are you trying to do?

    Mit freundlichen Grüßen,

    Thorsten Schöning

    --
    Thorsten Schöning
    AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig

    Telefon: Potsdam: 0331-743881-0
    E-Mail: tschoening@am-soft.de
    Web: http://www.am-soft.de

    AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam
    Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow


  3. Re: how to debug bugzilla?

    On Oct 3, 1:54*pm, Thorsten Schöning wrote:
    > Guten Tag rick.bry...@gxs.com,
    > am Freitag, 3. Oktober 2008 um 20:25 schrieben Sie:
    >
    > > have already
    > > tried using a simple 'print $my_variable' statement but can't seem to
    > > find where the standard output it going to. it's definitely not going
    > > to apache error_log!

    >
    > Use warn("some data:$my_variable"); and the message used to be saved
    > in error_log.
    >
    > What are you trying to do?
    >
    > Mit freundlichen Grüßen,
    >
    > Thorsten Schöning
    >
    > --
    > Thorsten Schöning
    > AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig
    >
    > Telefon: Potsdam: 0331-743881-0
    > E-Mail: *tschoen...@am-soft.de
    > Web: * *http://www.am-soft.de
    >
    > AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam
    > Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow


    am trying to add code for validating some custom fields but having
    difficulty with the code. i added the 2 lines immediately before the
    'return $validators;' line below:
    my @custom_fields = Bugzilla->get_fields({custom => 1, obsolete =>
    0});
    foreach my $field (@custom_fields) {
    my $validator;
    if ($field->type == FIELD_TYPE_SINGLE_SELECT) {
    $validator = \&_check_select_field;
    }
    elsif ($field->type == FIELD_TYPE_FREETEXT) {
    $validator = \&_check_freetext_field;
    }
    $validators->{$field->name} = $validator if $validator;
    }
    # added following required custom field check for cf_is_rts
    $validators->{cf_is_rts}=\&_check_cf_is_rts;
    warn("cf_is_rts:$validators->{cf_is_rts}");
    return $validators;

    set the log level in the apache httpd.conf file to 'warn' and and
    restarted apache but still get nothing in the error_log using the
    warn() function. the error_log is showing past compile errors but no
    runtime warnings. we're using apache 2.2.6 and bugzilla 3.0.5.

    ultimately trying to get the following function to work:
    sub _check_cf_is_rts {
    my ($invocant, $value, $field) = @_;
    $value = trim($value);
    check_field($field, $value);
    if ($value eq '---') {
    ThrowCodeError('illegal_field',{ field => $field });
    }
    return $value;
    }

    thanks,
    rick

  4. Re: how to debug bugzilla?

    On Fri, 3 Oct 2008 13:06:48 -0700 (PDT) rick.bryant@gxs.com wrote:
    > set the log level in the apache httpd.conf file to 'warn' and and
    > restarted apache but still get nothing in the error_log using the
    > warn() function.


    If you're accessing things over SSL, you might have to look in
    the ssl_error_log. I've forgotten that myself a few times.

    > ultimately trying to get the following function to work:
    > [snip]


    Just so you know, all your code looks right, provided that
    _check_cf_is_rts is inside of Bugzilla::Bug.

    > ThrowCodeError('illegal_field',{ field => $field });


    That's probably the wrong error, though. ThrowCodeError will
    display a message that the user should contact the administrator, and
    then the error you've specified.

    -Max
    --
    http://www.everythingsolved.com/
    Competent, Friendly Bugzilla and Perl Services. Everything Else, too.

+ Reply to Thread