I am trying to migrate from Komodo to VS Code as my IDE for Perl. Komodo is pretty much set up for Perl out of the box but for VS Code you have to download extensions for code intel, debugger, etc.

When you search for Perl on their extensions page, a whole sh*tload of them come up. Is anyone using VS Code? If so can you make recommendations which extensions to install?

UPDATE: Welp, further investigation shows that in order for VS Code to work properly with Perl, you need to install Perl::LanguageSever, and dependencies of that will not install properly on Windows. It apparently works with WSL, though you need to install the Perl dev libraries, according to some threads I found.

UPDATE 2: After some effort I got Perl::LanguageServer and its dependencies installed under WSL2/Ubuntu. I hit "run and debug," and the progress indicator runs for a couple of seconds, then it goes away and that's it. The script neither runs nor stops a a breakpoint and there are no error messages. So I'm stuck. If anyone has ideas please LMK.

UPDATE 3: SOLVED. In case anyone else tries to do this, here is what I learned. First, Perl::LanguageServer will not install on Windows. You will need to enable WSL2 and install it on Ubuntu. Follow the instructions on the github page for the module that instruct you to use apt to install some libraries before using cpan to install the module. Second, install VS Code on the Windows side using the MSI installer. Third, start VS Code from the Ubuntu side using the code command. You have to open a folder and make sure you trust that folder. Fourth, open the extensions tab and search for & install (in VS Code) Perl "Language Server and Debugger for Perl" Gerald Richter. Fifth create a Perl script, open the run and debug tab, then click Run and Debug.

At least that did it for me. Naturally, YMMV.


In reply to VS Code plugins for Perl by cormanaz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.