Intellij-elixir: Debugging Distillery Release CLI crashing on macOS due to badmatch error

Created on 22 Nov 2018  ·  24Comments  ·  Source: KronicDeth/intellij-elixir

_build/dev/rel/hello/bin/hello foreground
Exec: /usr/local/Cellar/erlang/21.1/lib/erlang/erts-10.1/bin/erlexec -noshell -noinput +Bd -boot /Users/sai/elixir-projects/hello/_build/dev/rel/hello/releases/0.1.0/hello -boot_var ERTS_LIB_DIR /usr/local/Cellar/erlang/21.1/lib/erlang/erts-10.1/../lib -env ERL_LIBS /Users/sai/elixir-projects/hello/_build/dev/rel/hello/lib -pa /Users/sai/elixir-projects/hello/_build/dev/rel/hello/lib/hello-0.1.0/consolidated -args_file /Users/sai/elixir-projects/hello/_build/dev/rel/hello/var/vm.args -config /Users/sai/elixir-projects/hello/_build/dev/rel/hello/var/sys.config -mode embedded -eval application:ensure_all_started(elixir) -eval 'Elixir.Code':require_file(<<"/private/var/folders/9v/vwx8qj4n7_55nff1pw39j2lr0000gq/T/intellij_elixir1/debugger/lib/intellij_elixir/debugger/server.ex">>) -eval 'Elixir.Code':require_file(<<"/private/var/folders/9v/vwx8qj4n7_55nff1pw39j2lr0000gq/T/intellij_elixir1/debugger/lib/intellij_elixir/debugged.ex">>) -eval 'Elixir.IntelliJElixir.Debugged':start()' -extra --
Root: /Users/sai/elixir-projects/hello/_build/dev/rel/hello
warning: variable "arg" is unused
/private/var/folders/9v/vwx8qj4n7_55nff1pw39j2lr0000gq/T/intellij_elixir1/debugger/lib/intellij_elixir/debugger/server.ex:404

warning: variable "counter" is unused
/private/var/folders/9v/vwx8qj4n7_55nff1pw39j2lr0000gq/T/intellij_elixir1/debugger/lib/intellij_elixir/debugger/server.ex:505

{"init terminating in do_boot",{{badmatch,{error,{1,erl_scan,{string,39,[]}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}

00:56:13.716 [error] Error in process #PID<0.7.0> on node :"[email protected]" with exit value:
{{:badmatch, {:error, {1, :erl_scan, {:string, 39, []}}, 1}}, [{:init, :start_it, 1, []}, {:init, :start_em, 1, []}, {:init, :do_boot, 3, []}]}

init terminating in do_boot ({{badmatch,{error,{1,erl_scan,{_}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done

Bug Debugger

Most helpful comment

First of all, thank you @KronicDeth for the great job. I really enjoy IDE with your elixir plugin.

I have same issue though:

/home/stanislavb/.asdf/installs/erlang/22.0.2/bin/erl -pa /home/stanislavb/.asdf/installs/erlang/22.0.2/lib -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/iex/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/elixir/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/logger/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/eex/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/ex_unit/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/mix/ebin -elixir ansi_enabled true -name [email protected] -setcookie 88aba1c4-3b9f-4d79-9f26-f2faf1a7999c -eval application:ensure_all_started(elixir) -eval 'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugger/server.ex\">>) -eval 'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugged.ex\">>) -eval 'Elixir.IntelliJElixir.Debugged':start()' -noshell -user Elixir.IEx.CLI -extra --no-halt -S /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/bin/mix phx.server
Erlang/OTP 22 [erts-10.4.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

{"init terminating in do_boot",{{badmatch,{error,{1,erl_scan,{string,39,[]}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({{badmatch,{error,{1,erl_scan,{_}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done

Fedora 30, Idea CE 2019.1.3, Elixir Plugin version 10.6.0

I think the problem is somewhere around single and double quotes.
This part -eval application:ensure_all_started(elixir) of run command should be -eval "application:ensure_all_started(elixir)" (double quotes or single around erlang code).
This part -eval 'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugger/server.ex\">>) also needs to be covered it double quotes (since single quotes are atoms in erlang).
This part eval 'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugged.ex\">>) same as previous.
There -eval 'Elixir.IntelliJElixir.Debugged':start()' we have ambiguous single quote in the end, so it should be -eval "'Elixir.IntelliJElixir.Debugged':start()".

I copied the command into my terminal and fixed quotes, here is what I get:

/home/stanislavb/.asdf/installs/erlang/22.0.2/bin/erl -pa /home/stanislavb/.asdf/installs/erlang/22.0.2/lib -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/iex/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/elixir/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/logger/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/eex/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/ex_unit/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/mix/ebin -elixir ansi_enabled true -name [email protected] -setcookie 88aba1c4-3b9f-4d79-9f26-f2faf1a7999c -eval "application:ensure_all_started(elixir)" -eval "'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugger/server.ex\">>)" -eval "'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugged.ex\">>)" -eval "'Elixir.IntelliJElixir.Debugged':start()" -noshell -user Elixir.IEx.CLI -extra --no-halt -S /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/bin/mix phx.server
Erlang/OTP 22 [erts-10.4.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Waiting for debugger to attach...

...
and then application runs

Hope it can help :)

All 24 comments

+1

+1, exact same error

macOS 10.13.6, elixir 1.7.4, Erlang 21.2.2, IntelliJ 2018.3.2, Elixir plug-in 10.2.0

The same

{"init terminating in do_boot",{{badmatch,{error,{1,erl_scan,{string,39,[]}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}

Elixir 1.8.1 (compiled with Erlang/OTP 21), Rubymine, Mac OS

/usr/local/Cellar/erlang/21.2.4/lib/erlang/bin/erl -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/dialyzer-3.3.1/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/ftp-1.0.1/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/sasl-3.3/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/syntax_tools-2.1.6/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/erl_docgen-0.8.1/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/parsetools-2.1.8/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/observer-2.8.2/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/ssl-9.1.2/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/reltool-0.7.8/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/snmp-5.2.12/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/erl_interface-3.10.4/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/eunit-2.3.7/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/os_mon-2.4.7/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/xmerl-1.3.19/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/runtime_tools-1.13.1/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/debugger-4.2.6/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/erts-10.2.3/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/common_test-1.16.1/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/tools-3.0.2/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/ssh-4.7.3/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/stdlib-3.7/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/mnesia-4.15.5/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/kernel-6.2/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/edoc-0.9.4/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/wx-1.8.6/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/hipe-3.18.2/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/tftp-1.0.1/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/et-1.6.4/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/diameter-2.1.6/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/eldap-1.2.6/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/megaco-3.18.4/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/compiler-7.3.1/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/asn1-5.0.8/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/inets-7.0.4/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/otp_mibs-1.2.1/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/crypto-4.4/ebin -pa /usr/local/Cellar/erlang/21.2.4/lib/erlang/lib/public_key-1.6.4/ebin -name [email protected] -setcookie 6b5bb36e-62b0-41df-bf3b-2a92e3e2d6e1 -eval application:ensure_all_started(elixir) -eval 'Elixir.Code':require_file(<<\"/private/var/folders/53/17f4wn2j4tb3szz62c9x4p2h0000gn/T/intellij_elixir5/debugger/lib/intellij_elixir/debugger/server.ex\">>) -eval 'Elixir.Code':require_file(<<\"/private/var/folders/53/17f4wn2j4tb3szz62c9x4p2h0000gn/T/intellij_elixir5/debugger/lib/intellij_elixir/debugged.ex\">>) -eval 'Elixir.IntelliJElixir.Debugged':start()' -pa /usr/local/Cellar/elixir/1.8.1/lib/logger/ebin -pa /usr/local/Cellar/elixir/1.8.1/lib/elixir/ebin -pa /usr/local/Cellar/elixir/1.8.1/lib/ex_unit/ebin -pa /usr/local/Cellar/elixir/1.8.1/lib/mix/ebin -pa /usr/local/Cellar/elixir/1.8.1/lib/eex/ebin -pa /usr/local/Cellar/elixir/1.8.1/lib/iex/ebin -noshell -s elixir start_cli -elixir ansi_enabled true -extra hello_world.ex

Any news here? Fixing that will enable IntelliJ debugging of Elixir, which would be awesome!

давайте, ребята, соберитесь. очень надо

I am having the same problem on Windows 7 when I try to debug a trivial project generated by Mix

I get

Testing started at 5:18 PM ...
"C:\Program Files\erl10.1\bin\erl.exe" -pa "C:/Program Files/erl10.1/lib/asn1-5.0.7/ebin" -pa "C:/Program Files/erl10.1/lib/common_test-1.16.1/ebin" -pa "C:/Program Files/erl10.1/lib/compiler-7.2.5/ebin" -pa "C:/Program Files/erl10.1/lib/crypto-4.3.3/ebin" -pa "C:/Program Files/erl10.1/lib/debugger-4.2.6/ebin" -pa "C:/Program Files/erl10.1/lib/dialyzer-3.3.1/ebin" -pa "C:/Program Files/erl10.1/lib/diameter-2.1.6/ebin" -pa "C:/Program Files/erl10.1/lib/edoc-0.9.4/ebin" -pa "C:/Program Files/erl10.1/lib/eldap-1.2.5/ebin" -pa "C:/Program Files/erl10.1/lib/erl_docgen-0.8.1/ebin" -pa "C:/Program Files/erl10.1/lib/erl_interface-3.10.4/ebin" -pa "C:/Program Files/erl10.1/lib/erts-10.1/ebin" -pa "C:/Program Files/erl10.1/lib/et-1.6.3/ebin" -pa "C:/Program Files/erl10.1/lib/eunit-2.3.7/ebin" -pa "C:/Program Files/erl10.1/lib/ftp-1.0.1/ebin" -pa "C:/Program Files/erl10.1/lib/hipe-3.18.1/ebin" -pa "C:/Program Files/erl10.1/lib/inets-7.0.2/ebin" -pa "C:/Program Files/erl10.1/lib/jinterface-1.9.1/ebin" -pa "C:/Program Files/erl10.1/lib/kernel-6.1/ebin" -pa "C:/Program Files/erl10.1/lib/megaco-3.18.4/ebin" -pa "C:/Program Files/erl10.1/lib/mnesia-4.15.5/ebin" -pa "C:/Program Files/erl10.1/lib/observer-2.8.1/ebin" -pa "C:/Program Files/erl10.1/lib/odbc-2.12.2/ebin" -pa "C:/Program Files/erl10.1/lib/os_mon-2.4.6/ebin" -pa "C:/Program Files/erl10.1/lib/otp_mibs-1.2.1/ebin" -pa "C:/Program Files/erl10.1/lib/parsetools-2.1.8/ebin" -pa "C:/Program Files/erl10.1/lib/public_key-1.6.2/ebin" -pa "C:/Program Files/erl10.1/lib/reltool-0.7.7/ebin" -pa "C:/Program Files/erl10.1/lib/runtime_tools-1.13.1/ebin" -pa "C:/Program Files/erl10.1/lib/sasl-3.2.1/ebin" -pa "C:/Program Files/erl10.1/lib/snmp-5.2.12/ebin" -pa "C:/Program Files/erl10.1/lib/ssh-4.7.1/ebin" -pa "C:/Program Files/erl10.1/lib/ssl-9.0.2/ebin" -pa "C:/Program Files/erl10.1/lib/stdlib-3.6/ebin" -pa "C:/Program Files/erl10.1/lib/syntax_tools-2.1.6/ebin" -pa "C:/Program Files/erl10.1/lib/tftp-1.0.1/ebin" -pa "C:/Program Files/erl10.1/lib/tools-3.0.1/ebin" -pa "C:/Program Files/erl10.1/lib/wx-1.8.5/ebin" -pa "C:/Program Files/erl10.1/lib/xmerl-1.3.18/ebin" test3_test.exs -name [email protected] -setcookie 3ae7374a-e81e-4cfd-99dd-3c2339563a81 -eval application:ensure_all_started(elixir) -eval 'Elixir.Code':require_file(<<\"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\intellij_elixir\debuggerserver.ex\">>) -eval 'Elixir.Code':require_file(<<\"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\intellij_elixir\debugged.ex\">>) -eval 'Elixir.Code':require_file(<<\"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\mix\tasks\intellij_elixir\debug.ex\">>) -pa "C:/Program Files (x86)/Elixir/lib/eex/ebin" -pa "C:/Program Files (x86)/Elixir/lib/elixir/ebin" -pa "C:/Program Files (x86)/Elixir/lib/ex_unit/ebin" -pa "C:/Program Files (x86)/Elixir/lib/iex/ebin" -pa "C:/Program Files (x86)/Elixir/lib/logger/ebin" -pa "C:/Program Files (x86)/Elixir/lib/mix/ebin" -noshell -s elixir start_cli -elixir ansi_enabled true -extra -r C:/Users/igorl/AppData/Local/Temp/intellij_elixir59/exunit/1.6.0/team_city_ex_unit_formatting.ex -r C:/Users/igorl/AppData/Local/Temp/intellij_elixir59/exunit/1.6.0/team_city_ex_unit_formatter.ex "C:\Program Files (x86)\Elixir\bin\mix" do intellij_elixir.debug, test --formatter TeamCityExUnitFormatter --trace
["c:/windows/System32/drivers/etc/hosts",53]
"inet_parse:~p:~p: erroneous line, SKIPPED~n"
{error_logger,info_msg}2019-03-16 17:18:45.233000

=INFO REPORT==== 16-Mar-2019::17:18:45.233000 ===
inet_parse:"c:/windows/System32/drivers/etc/hosts":53: erroneous line, SKIPPED

{"init terminating in do_boot",{#{'__exception__'=>true,'__struct__'=>'Elixir.Code.LoadError',file=><<99,58,47,85,115,101,114,115,47,105,103,111,114,108,47,68,111,99,117,109,101,110,116,115,47,69,108,105,120,105,114,95,119,111,114,107,47,116,101,115,116,51,47,85,115,101,114,115,105,103,111,114,108,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,53,57,49,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>,message=><<99,111,117,108,100,32,110,111,116,32,108,111,97,100,32,99,58,47,85,115,101,114,115,47,105,103,111,114,108,47,68,111,99,117,109,101,110,116,115,47,69,108,105,120,105,114,95,119,111,114,107,47,116,101,115,116,51,47,85,115,101,114,115,105,103,111,114,108,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,53,57,49,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>},[{'Elixir.Code',find_file,2,[{file,"lib/code.ex"},{line,1147}]},{'Elixir.Code',require_file,2,[{file,"lib/code.ex"},{line,754}]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,680}]},{init,start_it,1,[{file,"init.erl"},{line,1125}]},{init,start_em,1,[{file,"init.erl"},{line,1111}]},{init,do_boot,3,[{file,"init.erl"},{line,819}]}]}}
args: format: label: init terminating in do_boot ({,[{Elixir.Code,find_file,2,[{_},{_}]},{Elixir.Code,require_file,2,[{_},{_}]},{erl_eval,do_apply,6,[{_},{_}]},{init,start_it,1,[{_},{_}]},{init,start_em,1,[{_},{_}]},{init

Crash dump is being written to: erl_crash.dump...done

I took the binary objects and changed them to the strings using
def raw_binary_to_string(raw) from here:
https://stackoverflow.com/questions/22517250/how-to-convert-an-elixir-binary-to-a-string
I what I got looks rather corrupted: (Sorry about the capital letters not sure what is causing them)

c:/Users/igorl/Documents/Elixir_work/test3/UsersigorlAppDataLocalTempintellij_elixir591ebuggerlibintellij_elixirebugger erver.ex
could not load c:/Users/igorl/Documents/Elixir_work/test3/UsersigorlAppDataLocalTempintellij_elixir591ebuggerlibintellij_elixirebugger erver.ex

The capital letters being question marks could indicate that either your
default charset on Windows or the terminal’s character is not UTF8.

Which erlang and elixir installer did you use? What is your charset?

On Sat, Mar 16, 2019 at 10:59 AM audiobuddha notifications@github.com
wrote:

I am having the same problem on Windows 7 when I try to debug a trivial
project generated by Mix
I get

Testing started at 5:18 PM ...
"C:\Program Files\erl10.1\bin\erl.exe" -pa "C:/Program
Files/erl10.1/lib/asn1-5.0.7/ebin" -pa "C:/Program
Files/erl10.1/lib/common_test-1.16.1/ebin" -pa "C:/Program
Files/erl10.1/lib/compiler-7.2.5/ebin" -pa "C:/Program
Files/erl10.1/lib/crypto-4.3.3/ebin" -pa "C:/Program
Files/erl10.1/lib/debugger-4.2.6/ebin" -pa "C:/Program
Files/erl10.1/lib/dialyzer-3.3.1/ebin" -pa "C:/Program
Files/erl10.1/lib/diameter-2.1.6/ebin" -pa "C:/Program
Files/erl10.1/lib/edoc-0.9.4/ebin" -pa "C:/Program
Files/erl10.1/lib/eldap-1.2.5/ebin" -pa "C:/Program
Files/erl10.1/lib/erl_docgen-0.8.1/ebin" -pa "C:/Program
Files/erl10.1/lib/erl_interface-3.10.4/ebin" -pa "C:/Program
Files/erl10.1/lib/erts-10.1/ebin" -pa "C:/Program
Files/erl10.1/lib/et-1.6.3/ebin" -pa "C:/Program
Files/erl10.1/lib/eunit-2.3.7/ebin" -pa "C:/Program
Files/erl10.1/lib/ftp-1.0.1/ebin" -pa "C:/Program
Files/erl10.1/lib/hipe-3.18.1/ebin" -pa "C:/Program
Files/erl10.1/lib/inets-7.0.2/ebin" -pa "C:/Program
Files/erl10.1/lib/jinterface-1.9.1/ebin" -pa "C:/Program
Files/erl10.1/lib/kernel-6.1/ebin" -pa "C:/Program
Files/erl10.1/lib/megaco-3.18.4/ebin" -pa "C:/Program
Files/erl10.1/lib/mnesia-4.15.5/ebin" -pa "C:/Program
Files/erl10.1/lib/observer-2.8.1/ebin" -pa "C:/Program
Files/erl10.1/lib/odbc-2.12.2/ebin" -pa "C:/Program
Files/erl10.1/lib/os_mon-2.4.6/ebin" -pa "C:/Program
Files/erl10.1/lib/otp_mibs-1.2.1/ebin" -pa "C:/Program
Files/erl10.1/lib/parsetools-2.1.8/ebin" -pa "C:/Program
Files/erl10.1/lib/public_key-1.6.2/ebin" -pa "C:/Program
Files/erl10.1/lib/reltool-0.7.7/ebin" -pa "C:/Program
Files/erl10.1/lib/runtime_tools-1.13.1/ebin" -pa "C:/Program
Files/erl10.1/lib/sasl-3.2.1/ebin" -pa "C:/Program
Files/erl10.1/lib/snmp-5.2.12/ebin" -pa "C:/Program
Files/erl10.1/lib/ssh-4.7.1/ebin" -pa "C:/Program
Files/erl10.1/lib/ssl-9.0.2/ebin" -pa "C:/Program
Files/erl10.1/lib/stdlib-3.6/ebin" -pa "C:/Program
Files/erl10.1/lib/syntax_tools-2.1.6/ebin" -pa "C:/Program
Files/erl10.1/lib/tftp-1.0.1/ebin" -pa "C:/Program
Files/erl10.1/lib/tools-3.0.1/ebin" -pa "C:/Program
Files/erl10.1/lib/wx-1.8.5/ebin" -pa "C:/Program
Files/erl10.1/lib/xmerl-1.3.18/ebin" test3_test.exs -name
[email protected] -setcookie
3ae7374a-e81e-4cfd-99dd-3c2339563a81 -eval
application:ensure_all_started(elixir) -eval
'Elixir.Code':require_file(<<"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\intellij_elixir\debuggerserver.ex">>)
-eval
'Elixir.Code':require_file(<<"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\intellij_elixir\debugged.ex">>)
-eval
'Elixir.Code':require_file(<<"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\mix\tasks\intellij_elixir\debug.ex">>)
-pa "C:/Program Files (x86)/Elixir/lib/eex/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/elixir/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/ex_unit/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/iex/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/logger/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/mix/ebin" -noshell -s elixir start_cli -elixir
ansi_enabled true -extra -r
C:/Users/igorl/AppData/Local/Temp/intellij_elixir59/exunit/1.6.0/team_city_ex_unit_formatting.ex
-r
C:/Users/igorl/AppData/Local/Temp/intellij_elixir59/exunit/1.6.0/team_city_ex_unit_formatter.ex
"C:\Program Files (x86)\Elixir\bin\mix" do intellij_elixir.debug, test
--formatter TeamCityExUnitFormatter --trace
["c:/windows/System32/drivers/etc/hosts",53]
"inet_parse:~p:p: erroneous line, SKIPPEDn"
{error_logger,info_msg}2019-03-16 17:18:45.233000

=INFO REPORT==== 16-Mar-2019::17:18:45.233000 ===
inet_parse:"c:/windows/System32/drivers/etc/hosts":53: erroneous line,
SKIPPED

{"init terminating in do_boot",{#{'exception'=>true,'struct
'=>'Elixir.Code.LoadError',file=><<99,58,47,85,115,101,114,115,47,105,103,111,114,108,47,68,111,99,117,109,101,110,116,115,47,69,108,105,120,105,114,95,119,111,114,107,47,116,101,115,116,51,47,85,115,101,114,115,105,103,111,114,108,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,53,57,49,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>,message=><<99,111,117,108,100,32,110,111,116,32,108,111,97,100,32,99,58,47,85,115,101,114,115,47,105,103,111,114,108,47,68,111,99,117,109,101,110,116,115,47,69,108,105,120,105,114,95,119,111,114,107,47,116,101,115,116,51,47,85,115,101,114,115,105,103,111,114,108,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,53,57,49,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>},[{'Elixir.Code',find_file,2,[{file,"lib/code.ex"},{line,1147}]},{'Elixir.Code',require_file,2,[{file,"lib/code.ex"},{line,754}]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,680}]},{init,start_it,1,[{file,"init.erl"},{line,1125}]},{init,start_em,1,[{file,"init.erl"},{line,1111}]},{init,do_boot,3,[{file,"init.erl"},{line,819}]}]}}
args: format: label: init terminating in do_boot
({,[{Elixir.Code,find_file,2,[{},{}]},{Elixir.Code,require_file,2,[{
},{}]},{erl_eval,do_apply,6,[{},{}]},{init,start_it,1,[{},{
}]},{init,start_em,1,[{},{}]},{init
Crash dump is being written to: erl_crash.dump...done

I took the binary objects and changed them to the strings using
def raw_binary_to_string(raw) from here:

https://stackoverflow.com/questions/22517250/how-to-convert-an-elixir-binary-to-a-string
I what I got looks rather corrupted: (Sorry about the capital letters not
sure what is causing them)

c:/Users/igorl/Documents/Elixir_work/test3/UsersigorlAppDataLocalTempintellij_elixir591�ebuggerlibintellij_elixir�ebugger
erver.ex
could not load
c:/Users/igorl/Documents/Elixir_work/test3/UsersigorlAppDataLocalTempintellij_elixir591�ebuggerlibintellij_elixir�ebugger
erver.ex


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/KronicDeth/intellij-elixir/issues/1347#issuecomment-473554361,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AASNE5cSwIAYnY1cHBO2xB5_WPlpcu8_ks5vXRTkgaJpZM4Yv04e
.

Dear Luke,

Thank you very much for a rapid response.

Apparently some people claim that windows does not have the ability to
have UTF8 as default, see:
https://superuser.com/questions/239810/setting-utf8-as-default-character-encoding-in-windows-7
I ran chcp commend in the terminal and got:
C:\Users\igorl>chcp

Active code page: 437

with regards to the installer i chose the Windows installer from here
https://elixir-lang.org/install.html#windows
end it made a made a folder
C:\Program Files (x86)\Elixir

with Version file stating 1.8.1

thank you so much for your response. Note the error message occurs
inside the debug tab of the Intellij

On 3/16/2019 7:54 PM, Luke Imhoff wrote:

The capital letters being question marks could indicate that either your
default charset on Windows or the terminal’s character is not UTF8.

Which erlang and elixir installer did you use? What is your charset?

On Sat, Mar 16, 2019 at 10:59 AM audiobuddha notifications@github.com
wrote:

I am having the same problem on Windows 7 when I try to debug a trivial
project generated by Mix
I get

Testing started at 5:18 PM ...
"C:\Program Files\erl10.1\bin\erl.exe" -pa "C:/Program
Files/erl10.1/lib/asn1-5.0.7/ebin" -pa "C:/Program
Files/erl10.1/lib/common_test-1.16.1/ebin" -pa "C:/Program
Files/erl10.1/lib/compiler-7.2.5/ebin" -pa "C:/Program
Files/erl10.1/lib/crypto-4.3.3/ebin" -pa "C:/Program
Files/erl10.1/lib/debugger-4.2.6/ebin" -pa "C:/Program
Files/erl10.1/lib/dialyzer-3.3.1/ebin" -pa "C:/Program
Files/erl10.1/lib/diameter-2.1.6/ebin" -pa "C:/Program
Files/erl10.1/lib/edoc-0.9.4/ebin" -pa "C:/Program
Files/erl10.1/lib/eldap-1.2.5/ebin" -pa "C:/Program
Files/erl10.1/lib/erl_docgen-0.8.1/ebin" -pa "C:/Program
Files/erl10.1/lib/erl_interface-3.10.4/ebin" -pa "C:/Program
Files/erl10.1/lib/erts-10.1/ebin" -pa "C:/Program
Files/erl10.1/lib/et-1.6.3/ebin" -pa "C:/Program
Files/erl10.1/lib/eunit-2.3.7/ebin" -pa "C:/Program
Files/erl10.1/lib/ftp-1.0.1/ebin" -pa "C:/Program
Files/erl10.1/lib/hipe-3.18.1/ebin" -pa "C:/Program
Files/erl10.1/lib/inets-7.0.2/ebin" -pa "C:/Program
Files/erl10.1/lib/jinterface-1.9.1/ebin" -pa "C:/Program
Files/erl10.1/lib/kernel-6.1/ebin" -pa "C:/Program
Files/erl10.1/lib/megaco-3.18.4/ebin" -pa "C:/Program
Files/erl10.1/lib/mnesia-4.15.5/ebin" -pa "C:/Program
Files/erl10.1/lib/observer-2.8.1/ebin" -pa "C:/Program
Files/erl10.1/lib/odbc-2.12.2/ebin" -pa "C:/Program
Files/erl10.1/lib/os_mon-2.4.6/ebin" -pa "C:/Program
Files/erl10.1/lib/otp_mibs-1.2.1/ebin" -pa "C:/Program
Files/erl10.1/lib/parsetools-2.1.8/ebin" -pa "C:/Program
Files/erl10.1/lib/public_key-1.6.2/ebin" -pa "C:/Program
Files/erl10.1/lib/reltool-0.7.7/ebin" -pa "C:/Program
Files/erl10.1/lib/runtime_tools-1.13.1/ebin" -pa "C:/Program
Files/erl10.1/lib/sasl-3.2.1/ebin" -pa "C:/Program
Files/erl10.1/lib/snmp-5.2.12/ebin" -pa "C:/Program
Files/erl10.1/lib/ssh-4.7.1/ebin" -pa "C:/Program
Files/erl10.1/lib/ssl-9.0.2/ebin" -pa "C:/Program
Files/erl10.1/lib/stdlib-3.6/ebin" -pa "C:/Program
Files/erl10.1/lib/syntax_tools-2.1.6/ebin" -pa "C:/Program
Files/erl10.1/lib/tftp-1.0.1/ebin" -pa "C:/Program
Files/erl10.1/lib/tools-3.0.1/ebin" -pa "C:/Program
Files/erl10.1/lib/wx-1.8.5/ebin" -pa "C:/Program
Files/erl10.1/lib/xmerl-1.3.18/ebin" test3_test.exs -name
[email protected] -setcookie
3ae7374a-e81e-4cfd-99dd-3c2339563a81 -eval
application:ensure_all_started(elixir) -eval

'Elixir.Code':require_file(<<"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\intellij_elixir\debuggerserver.ex">>)
-eval

'Elixir.Code':require_file(<<"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\intellij_elixir\debugged.ex">>)
-eval

'Elixir.Code':require_file(<<"C:\Users\igorl\AppData\Local\Temp\intellij_elixir591\debugger\lib\mix\tasks\intellij_elixir\debug.ex">>)
-pa "C:/Program Files (x86)/Elixir/lib/eex/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/elixir/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/ex_unit/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/iex/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/logger/ebin" -pa "C:/Program Files
(x86)/Elixir/lib/mix/ebin" -noshell -s elixir start_cli -elixir
ansi_enabled true -extra -r

C:/Users/igorl/AppData/Local/Temp/intellij_elixir59/exunit/1.6.0/team_city_ex_unit_formatting.ex
-r

C:/Users/igorl/AppData/Local/Temp/intellij_elixir59/exunit/1.6.0/team_city_ex_unit_formatter.ex
"C:\Program Files (x86)\Elixir\bin\mix" do intellij_elixir.debug, test
--formatter TeamCityExUnitFormatter --trace
["c:/windows/System32/drivers/etc/hosts",53]
"inet_parse:~p:p: erroneous line, SKIPPEDn"
{error_logger,info_msg}2019-03-16 17:18:45.233000

=INFO REPORT==== 16-Mar-2019::17:18:45.233000 ===
inet_parse:"c:/windows/System32/drivers/etc/hosts":53: erroneous line,
SKIPPED

{"init terminating in do_boot",{#{'exception'=>true,'struct

'=>'Elixir.Code.LoadError',file=><<99,58,47,85,115,101,114,115,47,105,103,111,114,108,47,68,111,99,117,109,101,110,116,115,47,69,108,105,120,105,114,95,119,111,114,107,47,116,101,115,116,51,47,85,115,101,114,115,105,103,111,114,108,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,53,57,49,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>,message=><<99,111,117,108,100,32,110,111,116,32,108,111,97,100,32,99,58,47,85,115,101,114,115,47,105,103,111,114,108,47,68,111,99,117,109,101,110,116,115,47,69,108,105,120,105,114,95,119,111,114,107,47,116,101,115,116,51,47,85,115,101,114,115,105,103,111,114,108,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,53,57,49,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>},[{'Elixir.Code',find_file,2,[{file,"lib/code.ex"},{line,1147}]},{'Elixir.Code',require_file,2,[{file,"lib/code.ex"},{line,754}]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,680}]},{init,start_it,1,[{file,"init.erl"},{line,1125}]},{init,start_em,1,[{file,"init.erl"},{line,1111}]},{init,do_boot,3,[{file,"init.erl"},{line,819}]}]}}
args: format: label: init terminating in do_boot
({,[{Elixir.Code,find_file,2,[{},{}]},{Elixir.Code,require_file,2,[{
},{}]},{erl_eval,do_apply,6,[{},{}]},{init,start_it,1,[{},{
}]},{init,start_em,1,[{},{}]},{init
Crash dump is being written to: erl_crash.dump...done

I took the binary objects and changed them to the strings using
def raw_binary_to_string(raw) from here:

https://stackoverflow.com/questions/22517250/how-to-convert-an-elixir-binary-to-a-string
I what I got looks rather corrupted: (Sorry about the capital
letters not
sure what is causing them)

c:/Users/igorl/Documents/Elixir_work/test3/UsersigorlAppDataLocalTempintellij_elixir591�ebuggerlibintellij_elixir�ebugger
erver.ex
could not load

c:/Users/igorl/Documents/Elixir_work/test3/UsersigorlAppDataLocalTempintellij_elixir591�ebuggerlibintellij_elixir�ebugger
erver.ex


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

https://github.com/KronicDeth/intellij-elixir/issues/1347#issuecomment-473554361,
or mute the thread

https://github.com/notifications/unsubscribe-auth/AASNE5cSwIAYnY1cHBO2xB5_WPlpcu8_ks5vXRTkgaJpZM4Yv04e
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/KronicDeth/intellij-elixir/issues/1347#issuecomment-473569912,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AuDz8HDY3DrWVE06SonFWEXxQ5rD2wdUks5vXS_IgaJpZM4Yv04e.

Hi guys,

May I know how do you solve the above issue? I'm new to elixir and the plugin, hit exactly the same error when try to debug on IDEA, I'm using Elixir 1.6.2 & Erlang-otp 20.2-1.

#### On windows the error message is

Crash dump is being written to: erl_crash.dump...{"init terminating in do_boot",{#{'__exception__'=>true,'__struct__'=>'Elixir.Code.LoadError',file=><<99,58,47,78,45,53,67,71,56,49,51,53,76,48,57,45,68,97,116,97,47,106,105,97,119,122,104,111,117,47,68,101,115,107,116,111,112,47,101,108,105,120,105,114,47,105,115,115,117,101,115,47,85,115,101,114,115,106,105,97,119,122,104,111,117,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,49,51,54,54,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>,message=><<99,111,117,108,100,32,110,111,116,32,108,111,97,100,32,99,58,47,78,45,53,67,71,56,49,51,53,76,48,57,45,68,97,116,97,47,106,105,97,119,122,104,111,117,47,68,101,115,107,116,111,112,47,101,108,105,120,105,114,47,105,115,115,117,101,115,47,85,115,101,114,115,106,105,97,119,122,104,111,117,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,49,51,54,54,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>},[{'Elixir.Code',find_file,2,[{file,"lib/code.ex"},{line,1147}]},{'Elixir.Code',require_file,2,[{file,"lib/code.ex"},{line,754}]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,680}]},{init,start_it,1,[{file,"init.erl"},{line,1123}]},{init,start_em,1,[{file,"init.erl"},{line,1109}]},{init,do_boot,3,[{file,"init.erl"},{line,817}]}]}}

Which indicates "could not load file error":
file='c:/N-5CG8135L09-Data/jiawzhou/Desktop/elixir/issues/Usersxxx/AppDataLocalTempintellij_elixir1366\x7febuggerlibintellij_elixir\x7febugger erver.ex'
message='could not load c:/N-5CG8135L09-Data/jiawzhou/Desktop/elixir/issues/UsersxxxAppDataLocalTempintellij_elixir1366\x7febuggerlibintellij_elixir\x7febugger erver.ex'

Apprantly the file path is wrong on windows, is this a bug? So I tried on linux, but still there's crashing:

#### On linux the error message is

init terminating in do_boot ({{badmatch,{error,{1,erl_scan,{_}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...{"init terminating in do_boot",{{badmatch,{error,{1,erl_scan,{string,39,[]}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
done

Any place I've missing? Thanks in advance!

@audiobuddha, @irenekay can you try launch IntelliJ with code page 65001, which should be utf-8 (https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers)?

@irenekay I'm not sure why the UTF-8 settings wouldn't work on Linux.

First of all, thank you @KronicDeth for the great job. I really enjoy IDE with your elixir plugin.

I have same issue though:

/home/stanislavb/.asdf/installs/erlang/22.0.2/bin/erl -pa /home/stanislavb/.asdf/installs/erlang/22.0.2/lib -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/iex/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/elixir/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/logger/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/eex/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/ex_unit/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/mix/ebin -elixir ansi_enabled true -name [email protected] -setcookie 88aba1c4-3b9f-4d79-9f26-f2faf1a7999c -eval application:ensure_all_started(elixir) -eval 'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugger/server.ex\">>) -eval 'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugged.ex\">>) -eval 'Elixir.IntelliJElixir.Debugged':start()' -noshell -user Elixir.IEx.CLI -extra --no-halt -S /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/bin/mix phx.server
Erlang/OTP 22 [erts-10.4.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

{"init terminating in do_boot",{{badmatch,{error,{1,erl_scan,{string,39,[]}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({{badmatch,{error,{1,erl_scan,{_}},1}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done

Fedora 30, Idea CE 2019.1.3, Elixir Plugin version 10.6.0

I think the problem is somewhere around single and double quotes.
This part -eval application:ensure_all_started(elixir) of run command should be -eval "application:ensure_all_started(elixir)" (double quotes or single around erlang code).
This part -eval 'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugger/server.ex\">>) also needs to be covered it double quotes (since single quotes are atoms in erlang).
This part eval 'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugged.ex\">>) same as previous.
There -eval 'Elixir.IntelliJElixir.Debugged':start()' we have ambiguous single quote in the end, so it should be -eval "'Elixir.IntelliJElixir.Debugged':start()".

I copied the command into my terminal and fixed quotes, here is what I get:

/home/stanislavb/.asdf/installs/erlang/22.0.2/bin/erl -pa /home/stanislavb/.asdf/installs/erlang/22.0.2/lib -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/iex/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/elixir/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/logger/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/eex/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/ex_unit/ebin -pa /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/lib/mix/ebin -elixir ansi_enabled true -name [email protected] -setcookie 88aba1c4-3b9f-4d79-9f26-f2faf1a7999c -eval "application:ensure_all_started(elixir)" -eval "'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugger/server.ex\">>)" -eval "'Elixir.Code':require_file(<<\"/tmp/intellij_elixir5/debugger/lib/intellij_elixir/debugged.ex\">>)" -eval "'Elixir.IntelliJElixir.Debugged':start()" -noshell -user Elixir.IEx.CLI -extra --no-halt -S /home/stanislavb/.asdf/installs/elixir/1.8.2-otp-22/bin/mix phx.server
Erlang/OTP 22 [erts-10.4.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Waiting for debugger to attach...

...
and then application runs

Hope it can help :)

I could address this exception on Windows by manually fixing the command to be executed. Now it looks like this:
"C:\Program Files\erl10.1\bin\erl.exe" -pa "C:/Program Files/erl10.1/lib/asn1-5.0.7/ebin" -pa "C:/Program Files/erl10.1/lib/common_test-1.16.1/ebin" -pa "C:/Program Files/erl10.1/lib/compiler-7.2.5/ebin" -pa "C:/Program Files/erl10.1/lib/crypto-4.3.3/ebin" -pa "C:/Program Files/erl10.1/lib/debugger-4.2.6/ebin" -pa "C:/Program Files/erl10.1/lib/dialyzer-3.3.1/ebin" -pa "C:/Program Files/erl10.1/lib/diameter-2.1.6/ebin" -pa "C:/Program Files/erl10.1/lib/edoc-0.9.4/ebin" -pa "C:/Program Files/erl10.1/lib/eldap-1.2.5/ebin" -pa "C:/Program Files/erl10.1/lib/erl_docgen-0.8.1/ebin" -pa "C:/Program Files/erl10.1/lib/erl_interface-3.10.4/ebin" -pa "C:/Program Files/erl10.1/lib/erts-10.1/ebin" -pa "C:/Program Files/erl10.1/lib/et-1.6.3/ebin" -pa "C:/Program Files/erl10.1/lib/eunit-2.3.7/ebin" -pa "C:/Program Files/erl10.1/lib/ftp-1.0.1/ebin" -pa "C:/Program Files/erl10.1/lib/hipe-3.18.1/ebin" -pa "C:/Program Files/erl10.1/lib/inets-7.0.2/ebin" -pa "C:/Program Files/erl10.1/lib/jinterface-1.9.1/ebin" -pa "C:/Program Files/erl10.1/lib/kernel-6.1/ebin" -pa "C:/Program Files/erl10.1/lib/megaco-3.18.4/ebin" -pa "C:/Program Files/erl10.1/lib/mnesia-4.15.5/ebin" -pa "C:/Program Files/erl10.1/lib/observer-2.8.1/ebin" -pa "C:/Program Files/erl10.1/lib/odbc-2.12.2/ebin" -pa "C:/Program Files/erl10.1/lib/os_mon-2.4.6/ebin" -pa "C:/Program Files/erl10.1/lib/otp_mibs-1.2.1/ebin" -pa "C:/Program Files/erl10.1/lib/parsetools-2.1.8/ebin" -pa "C:/Program Files/erl10.1/lib/public_key-1.6.2/ebin" -pa "C:/Program Files/erl10.1/lib/reltool-0.7.7/ebin" -pa "C:/Program Files/erl10.1/lib/runtime_tools-1.13.1/ebin" -pa "C:/Program Files/erl10.1/lib/sasl-3.2.1/ebin" -pa "C:/Program Files/erl10.1/lib/snmp-5.2.12/ebin" -pa "C:/Program Files/erl10.1/lib/ssh-4.7.1/ebin" -pa "C:/Program Files/erl10.1/lib/ssl-9.0.2/ebin" -pa "C:/Program Files/erl10.1/lib/stdlib-3.6/ebin" -pa "C:/Program Files/erl10.1/lib/syntax_tools-2.1.6/ebin" -pa "C:/Program Files/erl10.1/lib/tftp-1.0.1/ebin" -pa "C:/Program Files/erl10.1/lib/tools-3.0.1/ebin" -pa "C:/Program Files/erl10.1/lib/wx-1.8.5/ebin" -pa "C:/Program Files/erl10.1/lib/xmerl-1.3.18/ebin" -name [email protected] -setcookie 57517409-c7d9-4caf-9e74-7ef5c70db413 -eval application:ensure_all_started(elixir) -eval 'Elixir.Code':require_file(^<^<\"C:\\Users\\Dima\\AppData\\Local\\Temp\\intellij_elixir\\debugger\\lib\\intellij_elixir\\debugger\\server.ex\"^>^>) -eval 'Elixir.Code':require_file(^<^<\"C:\\Users\\Dima\\AppData\\Local\\Temp\\intellij_elixir\\debugger\\lib\\intellij_elixir\\debugged.ex\"^>^>) -eval 'Elixir.Code':require_file(^<^<\"C:\\Users\\Dima\\AppData\\Local\\Temp\\intellij_elixir\\debugger\\lib\\mix\\tasks\\intellij_elixir\\debug.ex\"^>^>) -pa "C:/Program Files (x86)/Elixir 1.7.4/lib/eex/ebin" -pa "C:/Program Files (x86)/Elixir 1.7.4/lib/elixir/ebin" -pa "C:/Program Files (x86)/Elixir 1.7.4/lib/ex_unit/ebin" -pa "C:/Program Files (x86)/Elixir 1.7.4/lib/iex/ebin" -pa "C:/Program Files (x86)/Elixir 1.7.4/lib/logger/ebin" -pa "C:/Program Files (x86)/Elixir 1.7.4/lib/mix/ebin" -noshell -s elixir start_cli -elixir ansi_enabled true -extra "C:\Program Files (x86)\Elixir 1.7.4\bin\mix" do intellij_elixir.debug, phoenix.server
Please note the filenames in require_file. I escaped < and > with ^. And another thing is backslashes - need to escape them either.
I suppose it should be fixed somewhere here https://github.com/KronicDeth/intellij-elixir/blob/f9dd6b5bad850bf61184941555cc6591c2ef2ce6/src/org/elixir_lang/debugger/Modules.kt#L35

With this I managed to go one step further. The debugger's not crashing. But now it's stuck forever with

Waiting for debugger to attach...?

So still no debugging with IntelliJ :(

Anyone have a good work around on this issue?

@KronicDeth Love to see this moved up on the Bug fix list, please.

We can always debug other ways, but I'd like to have debugging directly in the IDE on Windows:

My error is the same as the above:
C:\erl10.1\bin\erl.exe -pa C:/erl10.1/lib/asn1-5.0.7/ebin -pa C:/erl10.1/lib/common_test-1.16.1/ebin -pa C:/erl10.1/lib/compiler-7.2.5/ebin -pa C:/erl10.1/lib/crypto-4.3.3/ebin -pa C:/erl10.1/lib/debugger-4.2.6/ebin -pa C:/erl10.1/lib/dialyzer-3.3.1/ebin -pa C:/erl10.1/lib/diameter-2.1.6/ebin -pa C:/erl10.1/lib/edoc-0.9.4/ebin -pa C:/erl10.1/lib/eldap-1.2.5/ebin -pa C:/erl10.1/lib/erl_docgen-0.8.1/ebin -pa C:/erl10.1/lib/erl_interface-3.10.4/ebin -pa C:/erl10.1/lib/erts-10.1/ebin -pa C:/erl10.1/lib/et-1.6.3/ebin -pa C:/erl10.1/lib/eunit-2.3.7/ebin -pa C:/erl10.1/lib/ftp-1.0.1/ebin -pa C:/erl10.1/lib/hipe-3.18.1/ebin -pa C:/erl10.1/lib/inets-7.0.2/ebin -pa C:/erl10.1/lib/jinterface-1.9.1/ebin -pa C:/erl10.1/lib/kernel-6.1/ebin -pa C:/erl10.1/lib/megaco-3.18.4/ebin -pa C:/erl10.1/lib/mnesia-4.15.5/ebin -pa C:/erl10.1/lib/observer-2.8.1/ebin -pa C:/erl10.1/lib/odbc-2.12.2/ebin -pa C:/erl10.1/lib/os_mon-2.4.6/ebin -pa C:/erl10.1/lib/otp_mibs-1.2.1/ebin -pa C:/erl10.1/lib/parsetools-2.1.8/ebin -pa C:/erl10.1/lib/public_key-1.6.2/ebin -pa C:/erl10.1/lib/reltool-0.7.7/ebin -pa C:/erl10.1/lib/runtime_tools-1.13.1/ebin -pa C:/erl10.1/lib/sasl-3.2.1/ebin -pa C:/erl10.1/lib/snmp-5.2.12/ebin -pa C:/erl10.1/lib/ssh-4.7.1/ebin -pa C:/erl10.1/lib/ssl-9.0.2/ebin -pa C:/erl10.1/lib/stdlib-3.6/ebin -pa C:/erl10.1/lib/syntax_tools-2.1.6/ebin -pa C:/erl10.1/lib/tftp-1.0.1/ebin -pa C:/erl10.1/lib/tools-3.0.1/ebin -pa C:/erl10.1/lib/wx-1.8.5/ebin -pa C:/erl10.1/lib/xmerl-1.3.18/ebin -pa C:/Elixir/lib/eex/ebin -pa C:/Elixir/lib/elixir/ebin -pa C:/Elixir/lib/ex_unit/ebin -pa C:/Elixir/lib/iex/ebin -pa C:/Elixir/lib/logger/ebin -pa C:/Elixir/lib/mix/ebin -elixir ansi_enabled true -name [email protected] -setcookie 51129c87-0f63-4b58-8774-af3cc7fee698 -eval application:ensure_all_started(elixir) -eval 'Elixir.Code':require_file(<<\"C:\Users\zjwooda1\AppData\Local\Temp\intellij_elixir5\debugger\lib\intellij_elixir\debuggerserver.ex\">>) -eval 'Elixir.Code':require_file(<<\"C:\Users\zjwooda1\AppData\Local\Temp\intellij_elixir5\debugger\lib\intellij_elixir\debugged.ex\">>) -eval 'Elixir.Code':require_file(<<\"C:\Users\zjwooda1\AppData\Local\Temp\intellij_elixir5\debugger\lib\mix\tasks\intellij_elixir\debug.ex\">>) -noshell -user Elixir.IEx.CLI -extra --no-halt -S C:\Elixir\bin\mix do intellij_elixir.debug, phx.server
{"init terminating in do_boot",{#{'__exception__'=>true,'__struct__'=>'Elixir.Co
de.LoadError',file=><<99,58,47,95,71,105,116,47,112,105,120,95,97,112,105,47,85,
115,101,114,115,122,106,119,111,111,100,97,49,65,112,112,68,97,116,97,76,111,99,
97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114
,53,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95
,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,4
6,101,120>>,message=><<99,111,117,108,100,32,110,111,116,32,108,111,97,100,32,99
,58,47,95,71,105,116,47,112,105,120,95,97,112,105,47,85,115,101,114,115,122,106,
119,111,111,100,97,49,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,10
5,110,116,101,108,108,105,106,95,101,108,105,120,105,114,53,127,101,98,117,103,1
03,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114
,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>},[{'Elixir.C
ode',find_file,2,[{file,"lib/code.ex"},{line,1193}]},{'Elixir.Code',require_file
,2,[{file,"lib/code.ex"},{line,806}]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"
init terminating in do_boot ({,[{Elixir.Code,find_file,2,[{_},{_}]},{Elixir.Code
},{line,680}]},{init,start_it,1,[{file,"init.erl"},{line,1125}]},{init,start_em,
1,[{file,"init.erl"},{line,1111}]},{init,do_boot,3,[{file,"init.erl"},{line,819}
,require_file,2,[{_},{_}]},{erl_eval,do_apply,6,[{_},{_}]},{init,start_it,1,[{_}
]}]}}
,{_}]},{init,start_em,1,[{_},{_}]},{init

If I run this part through an ASCII->Text converter:
99,58,47,95,71,105,116,47,112,105,120,95,97,112,105,47,85,
115,101,114,115,122,106,119,111,111,100,97,49,65,112,112,68,97,116,97,76,111,99,
97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114
,53,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95
,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,4
6,101,120

yields:
c:/_Git/pix_api/Userszjwooda1AppDataLocalTempintellij_elixir5ebuggerlibintellij_elixirebugger erver.ex

Looking at the lines above, i'm assuming Elixir is looking for:
C:\Users\zjwooda1\AppData\Local\Temp\intellij_elixir5\debugger\lib\intellij_elixir\debuggerserver.ex

Any help appreciated.

Thanks.

Is anyone available tomorrow to pair on this? I need someone that has the issue to reproduce and test fixes on since I can't reproduce in my Windows VMs.

@KronicDeth - I can reproduce the original issue (not the UTF-8 issue) in Ubuntu, if you need help in that regard.

hi, so the plugin can start the Phoenix project correctly, but when start debugging it crashes.
any solution on this?

Elixir 1.9.4
Erlang for Elixir 22
Elixir Plugin 11.5.0
Windows 10

Run is ok:
image
image

Debug is crashing:
image

"C:\Program Files\erl10.5\bin\erl.exe" -pa "C:/Program Files/erl10.5/lib/asn1-5.0.9/ebin" -pa "C:/Program Files/erl10.5/lib/common_test-1.18/ebin" -pa "C:/Program Files/erl10.5/lib/compiler-7.4.5/ebin" -pa "C:/Program Files/erl10.5/lib/crypto-4.6/ebin" -pa "C:/Program Files/erl10.5/lib/debugger-4.2.7/ebin" -pa "C:/Program Files/erl10.5/lib/dialyzer-4.1/ebin" -pa "C:/Program Files/erl10.5/lib/diameter-2.2.1/ebin" -pa "C:/Program Files/erl10.5/lib/edoc-0.11/ebin" -pa "C:/Program Files/erl10.5/lib/eldap-1.2.8/ebin" -pa "C:/Program Files/erl10.5/lib/erl_docgen-0.10/ebin" -pa "C:/Program Files/erl10.5/lib/erl_interface-3.13/ebin" -pa "C:/Program Files/erl10.5/lib/erts-10.5/ebin" -pa "C:/Program Files/erl10.5/lib/et-1.6.4/ebin" -pa "C:/Program Files/erl10.5/lib/eunit-2.3.8/ebin" -pa "C:/Program Files/erl10.5/lib/ftp-1.0.3/ebin" -pa "C:/Program Files/erl10.5/lib/hipe-3.19.1/ebin" -pa "C:/Program Files/erl10.5/lib/inets-7.1/ebin" -pa "C:/Program Files/erl10.5/lib/jinterface-1.10.1/ebin" -pa "C:/Program Files/erl10.5/lib/kernel-6.5/ebin" -pa "C:/Program Files/erl10.5/lib/megaco-3.18.6/ebin" -pa "C:/Program Files/erl10.5/lib/mnesia-4.16.1/ebin" -pa "C:/Program Files/erl10.5/lib/observer-2.9.2/ebin" -pa "C:/Program Files/erl10.5/lib/odbc-2.12.4/ebin" -pa "C:/Program Files/erl10.5/lib/os_mon-2.5.1/ebin" -pa "C:/Program Files/erl10.5/lib/parsetools-2.1.8/ebin" -pa "C:/Program Files/erl10.5/lib/public_key-1.7/ebin" -pa "C:/Program Files/erl10.5/lib/reltool-0.8/ebin" -pa "C:/Program Files/erl10.5/lib/runtime_tools-1.14/ebin" -pa "C:/Program Files/erl10.5/lib/sasl-3.4.1/ebin" -pa "C:/Program Files/erl10.5/lib/snmp-5.4/ebin" -pa "C:/Program Files/erl10.5/lib/ssh-4.8/ebin" -pa "C:/Program Files/erl10.5/lib/ssl-9.4/ebin" -pa "C:/Program Files/erl10.5/lib/stdlib-3.10/ebin" -pa "C:/Program Files/erl10.5/lib/syntax_tools-2.2.1/ebin" -pa "C:/Program Files/erl10.5/lib/tftp-1.0.1/ebin" -pa "C:/Program Files/erl10.5/lib/tools-3.2.1/ebin" -pa "C:/Program Files/erl10.5/lib/wx-1.8.9/ebin" -pa "C:/Program Files/erl10.5/lib/xmerl-1.3.22/ebin" -name [email protected] -setcookie faa76b71-b830-436f-90a2-6f49d703b1df -eval application:ensure_all_started(elixir) -eval 'Elixir.Code':require_file(<<\"C:\Users\Usuario\AppData\Local\Temp\intellij_elixir8\debugger\lib\intellij_elixir\debugger\server.ex\">>) -eval 'Elixir.Code':require_file(<<\"C:\Users\Usuario\AppData\Local\Temp\intellij_elixir8\debugger\lib\intellij_elixir\debugged.ex\">>) -eval 'Elixir.Code':require_file(<<\"C:\Users\Usuario\AppData\Local\Temp\intellij_elixir8\debugger\lib\mix\tasks\intellij_elixir\debug.ex\">>) -pa C:/ProgramData/chocolatey/lib/Elixir/lib/eex/ebin -pa C:/ProgramData/chocolatey/lib/Elixir/lib/elixir/ebin -pa C:/ProgramData/chocolatey/lib/Elixir/lib/ex_unit/ebin -pa C:/ProgramData/chocolatey/lib/Elixir/lib/iex/ebin -pa C:/ProgramData/chocolatey/lib/Elixir/lib/logger/ebin -pa C:/ProgramData/chocolatey/lib/Elixir/lib/mix/ebin -noshell -s elixir start_cli -elixir ansi_enabled true -extra C:\ProgramData\chocolatey\lib\Elixir\bin\mix do intellij_elixir.debug, phx.server
init terminating in do_boot ({,[{Elixir.Code,find_file,2,[{_},{_}]},{Elixir.Code,require_file,2,[{_},{_}]},{erl_eval,do_apply,6,[{_},{_}]},{init,start_it,1,[{_},{_}]},{init,start_em,1,[{_},{_}]},{init

Crash dump is being written to: erl_crash.dump...{"init terminating in do_boot",{#{'__exception__'=>true,'__struct__'=>'Elixir.Code.LoadError',file=><<99,58,47,100,101,118,47,108,101,97,114,110,47,101,108,105,120,105,114,95,112,104,111,101,110,105,120,47,85,115,101,114,115,85,115,117,97,114,105,111,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,56,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>,message=><<99,111,117,108,100,32,110,111,116,32,108,111,97,100,32,99,58,47,100,101,118,47,108,101,97,114,110,47,101,108,105,120,105,114,95,112,104,111,101,110,105,120,47,85,115,101,114,115,85,115,117,97,114,105,111,65,112,112,68,97,116,97,76,111,99,97,108,84,101,109,112,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,56,127,101,98,117,103,103,101,114,108,105,98,105,110,116,101,108,108,105,106,95,101,108,105,120,105,114,127,101,98,117,103,103,101,114,32,101,114,118,101,114,46,101,120>>},[{'Elixir.Code',find_file,2,[{file,"lib/code.ex"},{line,1193}]},{'Elixir.Code',require_file,2,[{file,"lib/code.ex"},{line,806}]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,680}]},{init,start_it,1,[{file,"init.erl"},{line,1123}]},{init,start_em,1,[{file,"init.erl"},{line,1109}]},{init,do_boot,3,[{file,"init.erl"},{line,817}]}]}}
done

The same thing happens (run ok, debug crashes) with a simple "Hello World" .ex or .exs file:
image

I can confirm that the exactly same thing is happening on MacOS

+1, windows 10
erl_crash.dump.txt

Hi,
Is there any solution to this?
I am facing the exact same problem, run is fine, debug fails. I am using ubuntu 18.04 with elixir 1.10.3.

So does that mean the problem is fixed on Windows only? Why is this issue closed? The problem is observed on many other OSes too.

I moved Windows problem to #1824. Please only report macOS crashes in this bug if you have badmatch error.

Since I can't reproduce this when doing Elixir Mix ExUnit run configurations on macOS, I took a better look at what is going on and then noticed that @k2m30's command line ends in -extra hello_world.ex. The only way I can see this happening is if you made a Run Configuration with hello_world.ex as the elixir argument, but that does really make sense as a thing to do because how would you call any code in that module? I know it is over a year ago, but what were you trying to do?

If you had a file call hello_world.ex, where you want to call a function you can't just run the file, you need some way to call the function such as using an IEx Mix Run Configuration, so you can type which function to call. I'm going to attribute this to just an invalid use of the run configuration unless you can explain what you were doing to see if I can make it work.

@saialluru's original command line appears to be showing using the debugger on a built release: dev/rel/hello/releases/0.1.0/hello

@sabudaye's command line is about using the IEx Mix Run configuration with phx.server, but on Linux.

All three of these are different usages, so I may once again split this issue further.

With the latest version of IntelliJ and Elixir plugin I am successfully able to start a fat Phoenix app and step through it via the debugger. Kudos for fixing the problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mariuszzak picture mariuszzak  ·  6Comments

Istiakmorsalin picture Istiakmorsalin  ·  4Comments

joshuataylor picture joshuataylor  ·  7Comments

bengro picture bengro  ·  3Comments

nhooyr picture nhooyr  ·  3Comments