Menu

Why there is no error display in DEBUG mode

Nik Henri
2015-04-06
2015-04-07
  • Nik Henri

    Nik Henri - 2015-04-06

    Hi,
    thank you for taking the time to help me.
    Why in DEBUG MODE if there is a perl error it's not display in the perl console ? (ex: synthax error). It just stop. I have to launch the in RUN MODE to see the error and then correct them and go back to DEBUG MODE.
    Is there a solution to avoid this ??

    ty !!!

     
    • Jan Ploski

      Jan Ploski - 2015-04-06

      I just tried with the current version of EPIC, and it worked for me. So you'd have to at least provide a small example of a case that doesn't work.

       
  • Nik Henri

    Nik Henri - 2015-04-06

    you are right, it work well in a new project
    I'm trying to reproduce the issue in a smaller project, might have something to do with:
    -IO::Socket
    -TK
    -require
    working on ...

     
    • Jan Ploski

      Jan Ploski - 2015-04-06

      IO::Socket sounds like a good guess, as the debugger backend (perl -d) relies on it to establish a connection with the frontend (EPIC). So it seems plausible that if you somehow messed it up the connectivity could become totally broken.

       
  • Nik Henri

    Nik Henri - 2015-04-06

    ok the problem come from TK,
    clicking on the button result of a crash (normal behavior)
    In RUN MODE, the error is display with the line
    In DEBUG MODE, nothing happen (my problem)
    try with this simple code:


    use Tk;

    my $mw = MainWindow->new;
    $mw->Button(
    -text => 'test',
    -command => sub { crash() }
    )->pack;

    MainLoop;


     
    • Jan Ploski

      Jan Ploski - 2015-04-06

      It happens because the Tk module apparently behaves differently in debug and non-debug mode. The same messages output to STDERR are for some reason redirected to the debugger backend stream handle (which you can view in EPIC if you enable the "Experimental debugger console" preference, and then click on "perl -d" item in the Debug view to populate the Console view).

      Even if you run this script without EPIC, just with "perl -d", you will notice that redirecting STDERR output through shell works in non-debug mode, but it does not work in debug mode. I guess you'd have to ask the maintainers of the Tk module what is going on and whether there is a workaround to restore the normal behavior.

       
  • Nik Henri

    Nik Henri - 2015-04-06

    oh ok,
    well I ll try to found a solution

     
  • Nik Henri

    Nik Henri - 2015-04-07

    There is something I don't understand, when I put the experimental console ON, I see the error. Wouldn't it be simple to just catch this and report it in the main console ?

     
  • Nik Henri

    Nik Henri - 2015-04-07

    I have found the source of my issue, creating a other topic

     

Log in to post a comment.