# Emacs Debugging (Request for Testing)

**URL:** <https://discourse.julialang.org/t/emacs-debugging-request-for-testing/122111>\
**Category:** Tooling\
**Tags:** debug, emacs\
**Created:** [November 1, 2024, 5:44am UTC](https://discourse.julialang.org/t/emacs-debugging-request-for-testing/122111 "2024-11-01T05:44:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shmiggles](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shmiggles/32/19871_2.png) [@shmiggles](https://discourse.julialang.org/u/shmiggles)\
**Post date:** [November 1, 2024, 5:44am UTC](https://discourse.julialang.org/t/emacs-debugging-request-for-testing/122111/1 "2024-11-01T05:44:17Z")

</div>

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

I would appreciate testing.

## Testing Instructions

First, ensure you have `DebugAdapter.jl` installed:

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

```

Clone the fork:

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

```

Then add the following configs to your `init.el`

```elisp
(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`.

---

<div class="post-metadata">

**Author:** ![jdm204](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdm204/32/39289_2.png) [@jdm204](https://discourse.julialang.org/u/jdm204)\
**Post date:** [November 2, 2024, 12:12pm UTC](https://discourse.julialang.org/t/emacs-debugging-request-for-testing/122111/2 "2024-11-02T12:12:16Z")

</div>

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

After cloning and installing DebugAdapter I ran:

```julia
(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:

```julia
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!

---

<div class="post-metadata">

**Author:** ![rmfritz](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@rmfritz](https://discourse.julialang.org/u/rmfritz)\
**Post date:** [March 17, 2025, 9:51pm UTC](https://discourse.julialang.org/t/emacs-debugging-request-for-testing/122111/3 "2025-03-17T21:51:45Z")

</div>

That was also my experience; before dap-debug would even load, I had to install lsp-mode, posframe, lsp-docker, bui, and lsp-treemacs.

Still haven’t gotten to using it…
