processone / docker-ejabberd

Set of ejabberd Docker images
95 stars 77 forks source link

Issues running debugger in DevContainers (CodeServer and VSCode) #104

Closed Athena9495 closed 1 year ago

Athena9495 commented 1 year ago

I forked the main processone/ejabberd branch when it was tagged for release 23.01, in a DevContainer on VSCode. Have been using it fine for a while now- but when trying to set it up for the rest of my team, I'm facing issues related to debugging.

Upon pressing f5 or running Relive from the Debug&Run section, I get a dialog box saying- Couldn't find a debug adapter descriptor for debug type 'erlang'. (extension might have failed to activate)

Just as a sanity check, I checked out the code from the repo to a CodeServer (as far as I understand it, both VSCode debugging and CodeServer should run similarly), and I get the same result.

From what I understand, the following steps should be sufficient to start debugging on a fresh unmodified install-

./autogen.sh
./configure --with-rebar=rebar3
make
F5 / Run>Start debugging

I hope this is the right place to raise this issue- If any further details need to be provided, please let me know.

Thanks.

badlop commented 1 year ago

Disclaimer: I don't use IDEs, or VSCode myself.

I downloaded ejabberd git with git clone, and then followed https://docs.ejabberd.im/developer/vscode/#coder-s-code-server

Once I have VSCode opened, I followed https://docs.ejabberd.im/developer/vscode/#basic-usage

More specifically when I enter VSCode, I just do those steps (I don't write the compilation instructions manually):

  1. open some erlang file, so Erlang LS extension gets started
  2. In RUN click ▷ Relive to compile and start ejabberd

Then ejabberd starts downloading its erlang dependencies, compiles them, and starts it.

Athena9495 commented 1 year ago

Sorry for the late reply, just tried one thing that I missed on the CodeServer that you mentioned- opening a file so that Erlang LS gets started. I don't know how I missed such a basic thing.

Please keep this issue open for a couple more days- I'd like to try this on my team's systems as well and get back.

Thanks.

Athena9495 commented 1 year ago

I'm closing this issue- all I had to do was open an erlang file to activate the Erlang LS Extension. Thanks @badlop for the input.