Community
    • Login

    DAP client plugin

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    5 Posts 4 Posters 157 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EkopalypseE Offline
      Ekopalypse
      last edited by

      This is not for the faint of heart :)
      Discussions should take place here

      PeterJonesP Lycan ThropeL 2 Replies Last reply Reply Quote 3
      • PeterJonesP Online
        PeterJones @Ekopalypse
        last edited by

        @Ekopalypse ,

        I tried it out briefly.

        Unfortunately (not your plugin’s fault), I was not able to figure out how to make the Perl debugger talk “DAP”, despite a few hours with AI suggestions.

        I was able to replicate your Python config, and that did work, so I guess I’ll be starting to use that if I want to single-step through Python. So thanks.

        rdipardoR EkopalypseE 2 Replies Last reply Reply Quote 0
        • rdipardoR Offline
          rdipardo @PeterJones
          last edited by

          @PeterJones said:

          Unfortunately I was not able to figure out how to make the Perl debugger talk “DAP”

          If you have the Rust toolchain installed, there’s a perl-dap binary crate.

          Obviously Notepad++ is no listed as a supported IDE, but the (VS Code) setup guide might be worth looking at: https://github.com/EffortlessMetrics/perl-lsp/blob/master/docs/how-to/DEBUGGING.md

          1 Reply Last reply Reply Quote 1
          • Lycan ThropeL Offline
            Lycan Thrope @Ekopalypse
            last edited by

            @Ekopalypse , is this supposed to be a multi-language type debugger launching tool? IE, if you have a debugger for your language, it can be called up in the NPP environment? Of is this something more specific? Reading the description, and loooking at the sample configs you posted, I’m assuming that’s what this is. Any guidance would be appreciated.

            1 Reply Last reply Reply Quote 0
            • EkopalypseE Offline
              Ekopalypse @PeterJones
              last edited by

              @PeterJones

              Which debugger did you use?
              The problem with all of them is—to quote the DAP specification

              Since launching is debugger/runtime specific, the arguments for this request are not part of this specification.

              figuring out how to start them.
              I do hope that they all have one thing in common: that they expect this as a valid JSON message, which I define as launch_args.

              I tried it using the link from @rdipardo, but unfortunately it didn’t work properly. I was able to run through my simple test code step by step, but the variables weren’t returned. That might be due to my configuration or setup, though.

              @lycan-thrope
              Yes, as long as the debugger supports dap there is a chance that it will work with this client.

              Note that all dialog boxes are Scintilla controls and are not protected by the “Read-only” setting. However, this should not be a problem, with the exception of the Breakpoint View, where the client receives information about which breakpoints are currently set. The markers in the source code—currently only in the active document—are removed after the debugging session stops, but they remain in the breakpoint view so they can be reused in a later debugging session.
              The exception, of course, is if I click on an already set breakpoint again; then it is also deleted, and of course if I select and delete something in the breakpoint view…

              Just for reference the config I used for the linked perl-dap

              [perl]
              debugger = "C:/WHATEVER_DIR/perl-dap.exe"
              debugger_args = ["--stdio"]
              mode = "io"
              # debugger_args = ["--socket", "--port", "13603"]
              # mode = "tcp"
              # host = "127.0.0.1"
              # port = 13603
              env  = {
              	PATH="C:/compilers/strawberry-perl-5.42.2.1/perl/bin", 
              }
              launch_args = '''{
              	"program": "C:/repos/nppdebugger/tests/debuggees/perl/test.pl",
              	"cwd": "C:/repos/nppdebugger/tests/debuggees/perl",
              	"perlPath": "C:/compilers/strawberry-perl-5.42.2.1/perl/bin"
              }'''
              
              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors