Menu

#711 Can't view variables when debugging

v0.7.x
open
nobody
None
5
2020-03-17
2020-03-14
David Vavra
No

I have been unable to view variables when debugging.
"An error occurred while dumping variables; contents of the Variables view may become invalid."
Appears when stopping at a breakpoint.

The net effect is the debugger is useless.

Perl: 5.28.1
EPIC: 0.7.7
Eclipse IDE: 2019-09 R (4.13.0)
Build id: 20190917-1200

eclipse.buildId=4.13.0.I20190916-1045
java.version=1.8.0_222
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.cpp.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product

This is a continuation of log file /home/dvavra/workspaces/2019-09/NEAT/.metadata/.bak_5.log
Created Time: 2020-03-14 00:36:11.790

Not sure how useful the following night be. It's what I get when copying the colole error log.

org.epic.debug
Info
Sat Mar 14 01:13:31 EDT 2020
Starting Perl debugger:
Command line:
/opt/perl/5.28.1/bin/perl
-I/home/dvavra/proj/HCP/TWINPERL
-I/home/dvavra/workspaces/2019-09/NEAT/.metadata/.plugins/org.epic.debug
-I/home/dvavra/proj/HCP/DAILY-CHARTS
-d
-w
-Mautoflush_epic
/home/dvavra/proj/HCP/DAILY-CHARTS/TestJson.pl
Working directory: /home/dvavra/proj/HCP/DAILY-CHARTS
Environment:
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
HISTCONTROL=ignoredups
XDG_RUNTIME_DIR=/run/user/1000
QTINC=/usr/lib64/qt-3.3/include
XDG_VTNR=1
ModuleTable_Sz=2
LIBRARY_PATH=/opt/intel/compilers_and_libraries_2019.3.199/linux/tbb/lib/intel64_lin/gcc4.7:/opt/intel/compilers_and_libraries_2019.3.199/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/lib/intel64_lin
USER=dvavra
LANG=en_US.utf8
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
__LMOD_REF_COUNT_LOADEDMODULES=python-sphinx/python3-sphinx:1
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
__LMOD_REF_COUNT_MODULEPATH=/etc/modulefiles:1;/usr/share/modulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core:1;/usr/share/lmod/lmod/modulefiles/Core:1
CPATH=/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/include
XDG_DATA_DIRS=/home/dvavra/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/usr/share
DESKTOP_SESSION=xfce
PANEL_GDK_CORE_DEVICE_EVENTS=0
LD_LIBRARY_PATH=/opt/usr:/opt/usr/local/lib64:/usr/local/lib64:/usr/local/lib64/mxnet:/opt/intel/compilers_and_libraries_2019.3.199/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2019.3.199/linux/tbb/lib/intel64_lin/gcc4.7:/opt/intel/compilers_and_libraries_2019.3.199/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/lib/intel64_lin
LMOD_sys=Linux
LMFILES=/usr/share/modulefiles/python-sphinx/python3-sphinx
XAUTHORITY=/var/run/lightdm/dvavra/xauthority
PKG_CONFIG_PATH=/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/bin/pkgconfig
LOADEDMODULES=python-sphinx/python3-sphinx
LOGNAME=dvavra
SVNHCP6=/home/svn/HCP/HCP6
BASH_FUNC_ml%%=() { eval $($LMOD_DIR/ml_cmd "$@")
}
URLHCP7=file:///home/svn/HCP/HCP7
SHELL=/bin/bash
NLSPATH=/opt/intel/compilers_and_libraries_2019.3.199/linux/compiler/lib/intel64/locale/%l_%t/%N:/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/lib/intel64_lin/locale/%l_%t/%N
QTLIB=/usr/lib64/qt-3.3/lib
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2461,unix/unix:/tmp/.ICE-unix/2461
PATH=/home/dvavra/bin:/home/dvavra/.local/bin:/usr/libexec/python3-sphinx:/opt/R/3.6.1/bin:/opt/RStudio/rstudio-1.2.5001/bin:/usr/lib64/qt-3.3/bin:/opt/perl/5.28.1/bin:/usr/lib64/ccache:/opt/intel/compilers_and_libraries_2019.3.199/linux/bin/intel64:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin
LD_LIBRARY_PATH_OLD=/opt/intel/compilers_and_libraries_2019.3.199/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2019.3.199/linux/tbb/lib/intel64_lin/gcc4.7:/opt/intel/compilers_and_libraries_2019.3.199/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl/lib/intel64_lin
LMOD_DIR=/usr/share/lmod/lmod/libexec
BASH_ENV=/usr/share/lmod/lmod/init/bash
ModuleTable001=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1aWxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5PXt9LG1UPXtbInB5dGhvbi1zcGhpbngiXT17WyJmbiJdPSIvdXNyL3NoYXJlL21vZHVsZWZpbGVzL3B5dGhvbi1zcGhpbngvcHl0aG9uMy1zcGhpbngiLFsiZnVsbE5hbWUiXT0icHl0aG9uLXNwaGlueC9weXRob24zLXNwaGlueCIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZXB0aCJdPTAsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09InB5dGhvbi1zcGhpbngiLH0sfSxtcGF0aEE9eyIvZXRjL21vZHVsZWZpbGVzIiwiL3Vzci9zaGFyZS9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUv
GDK_CORE_DEVICE_EVENTS=1
IMSETTINGS_MODULE=none
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod
LESSOPEN=||/usr/bin/lesspipe.sh %s
LMOD_PKG=/usr/share/lmod/lmod
MANPATH=/usr/share/lmod/lmod/share/man:
XMODIFIERS=@im=none
XDG_CONFIG_DIRS=/etc/xdg
HCP7=/home/dvavra/proj/HCP7
CVS_RSH=ssh
XDG_SESSION_ID=2
ModuleTable002=bW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJlL21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9Db3JlIix9LFsic3lzdGVtQmFzZU1QQVRIIl09Ii9ldGMvbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVmaWxlczovdXNyL3NoYXJlL21vZHVsZWZpbGVzL0xpbnV4Oi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvQ29yZTovdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9Db3JlIix9
LANGUAGE=en_US
HISTSIZE=1000
LIBOVERLAY_SCROLLBAR=0
SVNHOME=/home/svn
XDG_SEAT=seat0
SHLVL=0
MODULEPATH=/etc/modulefiles:/usr/share/modulefiles:/usr/share/modulefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core
BASH_FUNC_module%%=() { eval $($LMOD_CMD bash "$@") && eval $(${LMOD_SETTARG_CMD:-:} -s sh)
}
IMSETTINGS_INTEGRATE_DESKTOP=yes
MAIL=/var/spool/mail/dvavra
QTDIR=/usr/lib64/qt-3.3
XDG_MENU_PREFIX=xfce-
HOSTNAME=fred.dvavra.com
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_CURRENT_DESKTOP=XFCE
MODULEPATH_ROOT=/usr/share/modulefiles
PWD=/home/dvavra
HOME=/home/dvavra
__LMOD_REF_COUNT_PATH=/usr/libexec/python3-sphinx:1;/opt/R/3.6.1/bin:1;/opt/RStudio/rstudio-1.2.5001/bin:1;/usr/lib64/qt-3.3/bin:1;/opt/perl/5.28.1/bin:1;/usr/lib64/ccache:1;/opt/intel/compilers_and_libraries_2019.3.199/linux/bin/intel64:1;/usr/local/bin:1;/usr/bin:1;/bin:1;/usr/local/sbin:1;/usr/sbin:1
SSH_AGENT_PID=2661
MKLROOT=/opt/intel/compilers_and_libraries_2019.3.199/linux/mkl
SVNHCP7=/home/svn/HCP/HCP7
MODULESHOME=/usr/share/lmod/lmod
LMOD_VERSION=7.8.21
OXYGEN_DISABLE_INNER_SHADOWS_HACK=1
URLHCP6=file:///home/svn/HCP/HCP6
DISPLAY=:0.0
XDG_SESSION_CLASS=user
LMOD_SETTARG_FULL_SUPPORT=no
GDMSESSION=xfce
XDG_SESSION_TYPE=x11
INTEL_LICENSE_FILE=/opt/intel/compilers_and_libraries_2019.3.199/linux/licenses:/opt/intel/licenses:/home/dvavra/intel/licenses
__LMOD_REF_COUNT__LMFILES_=/usr/share/modulefiles/python-sphinx/python3-sphinx:1
TERM=dumb
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/dvavra
XDG_SESSION_DESKTOP=xfce
QT_IM_MODULE=xim
PERLDB_OPTS=RemotePort=192.168.1.202:5000 DumpReused ReadLine=0 PrintRet=0

Discussion

  • Jan Ploski

    Jan Ploski - 2020-03-14

    I just tried with a similar configuation (freshly compiled Perl 5.28.1, PadWalker 2.3, Eclipse 2019-06), and it works for me. Is the error displayed for any code or something very specific (the error may have to do with unusual content of variables to be dumped)? Any clues if you "Enable debugger console (experimental)" in Preferences > Perl? (The additional console will become available from the Debug view when you relaunch the debug configuration.)

     
  • David Vavra

    David Vavra - 2020-03-16
    The debugger consol is displaying the value.
    use strict;
    use JSON::Parse ':all';
    
    $\ = "\n";
    $,= ' ';
    
    my $jsonFile = "/tmp/odds.json";
    my $prl = json_file_to_perl ($jsonFile);
    

    Debug Console output:

    15: my $prl = json_file_to_perl ($jsonFile);
    DB<10> ;{
    do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_lexical_vars;

    my $offset = 0;
    my $savout = CORE::select($DB::OUT);
    dumpvar_epic::dump_lexical_vars($offset);
    CORE::select($savout);
    };

    9 $jsonFile
    1 1
    17 SCALAR(0x2437ec8)
    16 '/tmp/odds.json'
    2 14

    But getting "Error occurred whil dumping ..." message.
    Do I need to have PadWalker installed?
    There doesn't seem to be a reference to it.

     
  • David Vavra

    David Vavra - 2020-03-16

    Umm, that didn't get formatted well. Not sure how to get the vertical bars to display,

     
  • David Vavra

    David Vavra - 2020-03-16

    FWIW: I have PadWalker 2.3 installed.

     
  • Jan Ploski

    Jan Ploski - 2020-03-16

    It's the part $\ = "\n"; which messes it up. (Why) do you need it?

    (I'd also suggest you use the JSON::XS module for JSON parsing.)

     
  • David Vavra

    David Vavra - 2020-03-17

    Well, so $\ = "\n" it is.

    (Why) do you need it?

    The short answer is because I do.
    I might point out that, in the meantime, I've been using Devel::ptkdb which doesn't have this limitation.

    It seems strange to have to write code around the debugger's tastes.
    It should at least be documented so the writing-around can be accomplished.
    Are there any other debugger preferences that I should be aware of?

    I'd also suggest you use the JSON::XS module for JSON parsing

    Everybody's a critic :)

    I'm sure JSON::XS is just super-duper but JSON::Parse works just fine for my purposes.
    I'll keep JSON::XS in mind for future projects.

     

Log in to post a comment.