Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: [EMACS] "Emacs as Perl IDE" - Abstract for YAPC::EU 2016

by doom (Deacon)
on Jul 19, 2016 at 00:16 UTC ( [id://1168018]=note: print w/replies, xml ) Need Help??


in reply to Re: [EMACS] "Emacs as Perl IDE" - Abstract for YAPC::EU 2016
in thread [EMACS] "Emacs as Perl IDE" - Abstract for YAPC::EU 2016

The perldb works really well inside of emacs: you get a two window display, one window shows the shell/REPL area where you type debugger commands and the other shows the code it's tracing, with a "=>" superimposed, pointing at the next line that will be executed.

A screen shot: http://obsidianrook.com/devnotes/talks/perl_debugger/Images/emacs_perldb_big_color_screen.jpg

It's not the main way that I debug things, but if I'm feeling completely at sea about what some code is doing, playing with perldb is one of the tricks I might used to get oriented.

The "m" command is particularly interesting: it gives you a list of all available methods on a class or object. It's not very easy to get that information in any other way.

I wrote a tutorial on using it a long time ago (it's a bit dated, and probably a bit long).

  • Comment on Re^2: [EMACS] "Emacs as Perl IDE" - Abstract for YAPC::EU 2016

Replies are listed 'Best First'.
Re^3: [EMACS] "Emacs as Perl IDE" - Abstract for YAPC::EU 2016
by Erez (Priest) on Jul 19, 2016 at 07:17 UTC

    The perldb works really well inside of emacs

    That's very nice to know. I've probably never used the perdb in my work, but I do appreciate its existence and that it works well within emacs.

    Principle of Least Astonishment: Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert

      > works well within emacs.

      To be fair, Komodo's debugger integration is better.

      You can click on a line in the source code to add a break-point ... and IIRC (?) the next run will be automatically executed under the debugger then.

      This could be implemented in Emacs of course and I haven't tried out alternative packages yet.

      Simply because debugger is very low on my priority list.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

        And if we're going to continue being fair, using perldb inside emacs isn't so good with apache, becuase you need to run in single-process mode. If you've got some subtle problem with multiple apache processes, you're better off using it with the Tk front-end.

        Setting breakpoints by clicking on a line sounds like an okay feature... I guess I might also like some sort of highlighting feature to see where breakpoints are set.

        Nevertheless, I highly recommend using perl -d with *some* sort of front-end that shows the context of the code you're looking at so you don't have to keep punching the "v" command (I think it's "v"... used to be "w" for window, but now that's watchexpression).

Re^3: [EMACS] "Emacs as Perl IDE" - Abstract for YAPC::EU 2016
by zakame (Pilgrim) on Sep 13, 2016 at 08:35 UTC
    Speaking of REPLs, I've been using Reply for a good while now (especially with plugins,) and thankfully there's an Emacs frontend for it.
Re^3: [EMACS] "Emacs as Perl IDE" - Abstract for YAPC::EU 2016
by LanX (Saint) on Jul 19, 2016 at 22:45 UTC
    Hey Joe, nice to read you again! :-)

    You might want to put your ink into [...] to make it clickable.

    I wanted to "borough" one or two of the quotes from your old talk if it's OK! ;-)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

      Sure, you use whatever you like.

      Yeah, clearly I haven't been around here lately, I've forgotten the local mangled version of html.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1168018]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-19 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found