vscode_erlang icon indicating copy to clipboard operation
vscode_erlang copied to clipboard

Debugger crashes if a breakpoint is set in a non Erlang file

Open SachsKaylee opened this issue 6 years ago • 0 comments

This took quite a while to figure out, but there is an issue that crashes the debugger if a breakpoint is set in a file that erl_parse cannot parse(e.g. a app.src file).

Here's the error log:

starting : erlc 
-o ../ebin gen_connection.erl vscode_connection.erl vscode_jsone.erl
vscode_connection.erl:2: Warning: behaviour gen_connection undefined
erlc exit code:0
debug:Starting http listener...
debug: on http://127.0.0.1:35537

erlc exit code:0
Starting erlang
	path      : /home/patrick/Development/erlang-vscode-test
	arguments : -env ERL_LIBS ./_build/default/lib -setcookie dev -sname dev -config ./config/sys.config -eval "application:ensure_all_started(erlvscode)"
starting : erl 
-noshell -pa "/home/patrick/.vscode/extensions/pgourlain.erlang-0.5.2/apps/erlangbridge/ebin" -s int -vscode_port 35537 -s vscode_connection start -args_file "/tmp/erlang-vscode-test_6570028" -env ERL_LIBS ./_build/default/lib -setcookie dev -sname dev -config ./config/sys.config -eval "application:ensure_all_started(erlvscode)"
{"init terminating in do_boot",{{ba
dmatch,{error,{1,erl_parse,["syntax error before: ","'.'"]}}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({{badmatch,{error,{1,erl_parse,[_]}}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dum
p...
done
erl exit code:1
erl exit with code 1
erl exit code:1
erl exit with code 1

Here's a GIF reproducing the error: vscode-breakpoint

To reproduce yourself simply clone https://github.com/PatrickSachs/erlang-vscode-test, set the breakpoint and hit F5.

SachsKaylee avatar Jun 12 '19 10:06 SachsKaylee