vscode-elixir-ls icon indicating copy to clipboard operation
vscode-elixir-ls copied to clipboard

Are you planning add support iex -S mix debugging?

Open big-town opened this issue 5 years ago • 4 comments

Hello. Are you planning add support iex -S mix debugging?

big-town avatar Mar 05 '20 15:03 big-town

Can you explain more about what you mean by "iex -S mix debugging"?

axelson avatar Mar 06 '20 20:03 axelson

I can imagine what big-town is asking for, because I might have the same request. It's pretty simple. I want to attach an iex session via --remsh, so I can use the iex session to execute code, that runs into a breakpoint and can such be debugged.

I achieved this by adding an "sname" to the elixir invocation in the debugger.sh

In the following file: .vscode/extensions/elixir-lsp.elixir-ls-0.3.2/elixir-ls-release/debugger.sh I changed the elixir line to: elixir --sname debug -e "ElixirLS.Debugger.CLI.main()"

Then i can attach to that process with: iex -S mix --remsh debug --sname debug-client

Obviously the sname could be something else. Unfortunately, I'm a newbie about github and pull-requests.

k-qb avatar Apr 12 '20 09:04 k-qb

Excuse me I didn’t answer for so long. I mean for the debugging process in interactive mode. For example: I run my application like this: iex --name service@host. Usually I execute set of command :debugger.start, :int.ni Module, :int.break Module, row. Similar algorithm implements the Idea IDE with an extension for elixir.

big-town avatar Apr 12 '20 09:04 big-town

A PR would be welcome

lukaszsamson avatar Sep 30 '20 16:09 lukaszsamson

ELS_ELIXIR_OPTS and ELS_ERL_OPTS are now supported. You can pass --sname --cookie mycookie via ELS_ELIXIR_OPTS and connect to it from iex session. I believe this issue is now resolved.

lukaszsamson avatar Jun 22 '23 11:06 lukaszsamson