Replies: 2 comments 1 reply
-
Hi @ebengt, I think you have many options for this.
Which IDE are you using and which call is failing? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the suggestions. I had forgotten about attaching ''manually'' (I do it with the extended start script in a release). When I ask for where a function is defined I get: 2022/02/08 13:26:18 log: LSP Log: [2022-02-08T13:26:18.218683+01:00] [debug] [Response] [message=#{id => 3,jsonrpc => <<"2.0">>,result => #{range => #{'end' => #{character => 12,line => 132},start => #{character => 0,line => 132}},uri => <<"file:///home/bengt/tp/ercdf/_build/default/lib/s3filez/src/s3filez.erl">>}}] [els_protocol:response/2 L61] <0.166.0> 2022/02/08 13:26:18 log: LSP Log: [2022-02-08T13:26:18.218983+01:00] [debug] [SERVER] Sending response [response=Content-Length: 193, , {"id":3,"jsonrpc":"2.0","result":{"range":{"end":{"character":12,"line":132},"start":{"character":0,"line":132}},"uri":"file:///home/bengt/tp/ercdf/_build/default/lib/s3filez/src/s3filez.erl"}}] [els_server:handle_request/2 L167] <0.166.0> When I ask for completion of a function name I get 2022/02/08 13:20:52 log: LSP Error: [2022-02-08T13:20:52.142146+01:00] [error] Generic server els_completion_provider terminating. Reason: {{case_clause,0},[{els_completion_provider,handle_request,2,[{file,"/home/bengt/Downloads/erlang_ls/apps/els_lsp/src/els_completion_provider.erl"},{line,58}]},{els_provider,handle_call,3,[{file,"/home/bengt/Downloads/erlang_ls/apps/els_core/src/els_provider.erl"},{line,93}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,721}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,750}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}. Last message: {handle_request,{completion,#{<<"context">> => #{<<"triggerKind">> => 0},<<"position">> => #{<<"character">> => 4,<<"line">> => 35},<<"textDocument">> => #{<<"uri">> => <<"file:///home/bengt/tp/ercdf/_build/default/lib/s3filez/src/s3filez.erl">>}}}}. State: #{internal_state => #{},provider => els_completion_provider}. Client els_server stacktrace: [{gen,do_call,4,[{file,"gen.erl"},{line,214}]},{gen_server,call,3,[{file,"gen_server.erl"},{line,243}]},{els_methods,textdocument_completion,2,[{file,"/home/bengt/Downloads/erlang_ls/apps/els_lsp/src/els_methods.erl"},{line,247}]},{els_methods,dispatch,4,[{file,"/home/bengt/Downloads/erlang_ls/apps/els_lsp/src/els_methods.erl"},{line,74}]}]. [gen_server:error_info/7 L949] <0.6317.0> |
Beta Was this translation helpful? Give feedback.
-
How do I debug erlang_ls when a client program complains about returned JSON?
I would like to start erlang_ls without escript and stdio, ie as ''rebar3 shell''' and have the client attach with TCP. But that means adding back TCP and making a start() that does escript things.
Perhaps there is a better way?
How does other people do?
Beta Was this translation helpful? Give feedback.
All reactions