https://github.com/svaante/dape#

Given that eglot has been part of the core emacs, I believe this is a long lasting wish for a lot of emacsers that has finally been fulfilled. (a stand alone DAP implementation that does not rely on LSP-mode)

  • svaante@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    There is

    In python:

    import debugpy
    debugpy.listen(5678) # debugpy will open 5678
    

    Then add the following configuration to dape

    (add-to-list 'dape-configs
    `(debugpy-attach
      modes ()
      host "localhost"
      port ,(lambda () (read-number "Port: "))
      :type "debugpy"
      :request "attach"))
    

    Supposedly there is a way to attach by pid with python3 -m debugpy --listen localhost:5678 --pid 12345, but that failed, both on osx and linux.

      • JDRiverRun@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Did you either succeed with debugpy.listen()? Is that suitable to call interactively then quit (like iPDB)?