Emacs Debugging (Request for Testing)

Debugging Julia programs in Emacs is now possible. Open PR for dap-mode integration with DebugAdapter: Support Julia by subthedubdub · Pull Request #813 · emacs-lsp/dap-mode · GitHub (it includes a screenshot).

I would appreciate testing.

Testing Instructions

First, ensure you have DebugAdapter.jl installed:

$ julia -e 'import Pkg; Pkg.add("DebugAdapter")'

Clone the fork:

$ git clone https://github.com/subthedubdub/dap-mode.git 

Then add the following configs to your init.el

(add-to-list 'load-path "/path/to/dap-mode")

(require 'dap-mode)
(require 'dap-ui)
(require 'dap-julia)

(dap-mode 1)
(dap-ui-mode 1)

Then open a Julia file in a Julia project (a Project.toml or JuliaProject.toml must be defined). Then run M-x dap-debug. It will ask you for a run template. Choose Julia Run Configuration.

6 Likes

Hi, this looks good, always keen for better Julia support in Emacs.

After cloning and installing DebugAdapter I ran:

(add-to-list 'load-path "/home/jdm204/scratch/testdebug/dap-mode")

(use-package lsp-mode)
(use-package posframe)
(use-package lsp-docker)
(use-package bui)
(use-package lsp-treemacs)

(require 'dap-mode)
(require 'dap-ui)
(require 'dap-julia)

(dap-mode 1)
(dap-ui-mode 1)

The use-package statements were required.
Then after calling dap-debug and choosing JRC I get the following messages:

Failed to connect to localhost:43941 with error message make client process failed: Connection refused, :name, Julia Debug, :buffer, nil, :host, localhost, :service, 43941, :nowait, nil, :noquery, nil, :tls-parameters, nil, :coding, no-conversion [138 times]
Debug session process exited with status: deleted

I have GNU Emacs 30.0.92 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0), package management with Elpaca.

Let me know if I should provide more info!