in reply to Expect.pm debugging in Windows

Is the Expect module required by Eclipse? Or is it a component of the GUI app you are debugging?

If the latter then Expect won't install on non-POSIX systems anyway due to IO::Tty (see cpanm log below), so you would need to be able to install the GUI using (cygwin|msys2|bash for windows).

If the former then you should be able to run your GUI code through a non-GUI debugger. The GUI IDEs just provide a nicer interface for stepping, setting breakpoints and so forth.

Another option is to get a trial license for a commercial IDE. Maybe the trial will last long enough for you to solve the issue.

-----

cpanm log:

cpanm --verbose IO::Tty cpanm (App::cpanminus) 1.7044 on perl 5.028000 built for MSWin32-x64-m +ulti-thread Work directory is C:\BERRYB~1\528~1.0_6\data/.cpanm/work/1556599810.22 +408 You have make C:\berrybrew\5.28.0_64_PDL\c\bin\gmake.exe You have LWP 6.34 Falling back to Archive::Tar 2.30 Searching IO::Tty () on cpanmetadb ... --> Working on IO::Tty Fetching http://www.cpan.org/authors/id/T/TO/TODDR/IO-Tty-1.12.tar.gz +... OK Unpacking IO-Tty-1.12.tar.gz Entering IO-Tty-1.12 Checking configure dependencies from META.json Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34) Running Makefile.PL Configuring IO-Tty-1.12 ... This module requires a POSIX compliant sys +tem to work. Try cygwin if you need this module on windows OS unsupported at Makefile.PL line 6. N/A ! Configure failed for IO-Tty-1.12. See C:\BERRYB~1\528~1.0_6\data\.cp +anm\work\1556599810.22408\build.log for details.

Replies are listed 'Best First'.
Re^2: Expect.pm debugging in Windows
by bandros (Novice) on Apr 30, 2019 at 15:31 UTC

    It's honestly a pretty simple script (not necessarily a GUI script), I am just most familiar using Eclipse with the Epic perl plugin to debug (and like you said step through code, set breakpoints, etc)

    The expect module is just required by the perl script I am debugging (which I haven't encountered/used in my previous Perl development work). I will try the Cygwin/Strawberry Perl method and see if that helps as far as getting Expect to work on windows. Otherwise I will return to this thread and try some of the other suggestions or just use the non-GUI debugger method! I really do appreciate everyone's replies.

    I was just trying to see if there was a simple, straightforward approach that someone else has found with getting Perl + Eclipse to work on Windows

      What you are describing is very obscure in many dimensions

      Windows   X   Expect.pm   X   Debugger   X   EPIC/Eclipse

      My guess (???) is your real problem is remote debugging . °

      Like already said does the perl-debugger allow bidirectional communication via sockets.

      Like this you can run your script with Expect.pm on a Linux machine, even in a VM, and debug it from Windows.

      I'd be very surprised if EPIC didn't allow that.

      If that is not the answer you are seeking for, please try to split your general question into more specific parts

      i.e. tell us what's wrong with

      • Expect.pm
      • Windows
      • Perl Debugger
      • Eclipse / EPIC

      I'm afraid, there is no IDE which will help you overcome conceptional problems.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      update

      °) Another guess is that you just need to install Expect.pm inside cygwin's Perl installation. This has nothing to do with debugger or IDE.

        I think your last point (installing Expect.pm through Cygwin) might be the path of least resistance for this problem! Like I said, I would be able to provide more details but I am kind of left to my own devices (and Google) to figure this out.

        The main issue is just that I am trying to debug this Perl script (so I can step through/set breakpoints etc) using EPIC plugin for Eclipse IDE (because that is what I am most familiar with for debugging Perl scripts), and I have ActivePerl installed as my Perl interpreter. From what I have read it seems like this is not the correct way to do it in Windows OS (and I am only used to doing Perl in a Linux VM that I had at my old job).

        Right now though I cannot modify my own computer software (need admin access) so I am attempting to get that access so I can try out Cygwin install method that you mentioned above. I really really appreciate your feedback to solve this problem! I apologize if I was not descriptive enough or too vague as to explaining what the issue actually is. The error message that I got from the Perl interpreter is this: "Can't locate Expect.pm in @INC" and after googling it seemed like its not straightforward to install that module using ActivePerl on Windows. Hopefully that helps!

        Thanks so much for your help!