This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Debugging 2.x.x
Milad edited this page Sep 4, 2017
·
1 revision
document is work in progress
- Elixir 1.3 or above
- Erlang 19 or above
- Python
The first thing you can do is to make sure Alchemist.vim works, cd to your elixir root project and execute alchemist_client
and then type PING and wait for the PONG response
cd ~/my/elixir/project
~/.vim/bundle/alchemist.vim/alchemist_client -d ./
PING
PONG
END-OF-PING
Do you have python, Elixir and Erlang in your machine?
If you can't pass this steps open an issue!
Looks up for the file that a function is defined in with DEFL
~/.vim/bundle/alchemist.vim/alchemist_client -d ./
DEFL { "List,flatten", [ context: Elixir, imports: [], aliases: [] ] }
/private/tmp/elixir-20170105-33654-j6r5gw/elixir-1.4.0/lib/elixir/lib/list.ex
END-OF-DEFL
And lookup line of definition with DEFLX
~/.vim/bundle/alchemist.vim/alchemist_client -d ./
DEFLX { "List.flatten", [ context: Elixir, imports: [], aliases: [] ] }
/private/tmp/elixir-20170105-33654-j6r5gw/elixir-1.4.0/lib/elixir/lib/list.ex:1
END-OF-DEFL
Create lib/custom_module.ex
with this content in your project
defmodule CustomModule do
def foo do
:ok
end
end
Now let's see Alchemist.vim can find the file and definition
~/.vim/bundle/alchemist.vim/alchemist_client -d ./
DEFL { "CustomModule,foo", [ context: Elixir, imports: [], aliases: [] ] }
/private/tmp/my_app/lib/custom_module.ex
END-OF-DEFL
If the result is empty, run
mix compile
and retry again
And lookup line of definition with DEFLX
~/.vim/bundle/alchemist.vim/alchemist_client -d ./
DEFLX { "CustomModule.foo", [ context: Elixir, imports: [Quickfix], aliases: []] }
/private/tmp/my_app/lib/custom_module.ex:2
END-OF-DEFL