-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for function breakpoints in debugger (#656)
* remove not supported SetExceptionBreakpoints request handler Clients should only call this request if the capability ‘exceptionBreakpointFilters’ returns one or more filters. No way to implement it via :int module * implement function breakpoints * test erlang breakpoints * fix small memory leak when unsetting last breakpoint in file * add more breakpoint tests * make tests more synchronous * add function breakpoints tests * interpret modules * extract and test mfa parsing * run formatter * Update readme * cleanup
- Loading branch information
1 parent
c8ff98b
commit 7a9bbc3
Showing
7 changed files
with
501 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
defmodule ElixirLS.Debugger.Utils do | ||
def parse_mfa(mfa_str) do | ||
case Code.string_to_quoted(mfa_str) do | ||
{:ok, {:/, _, [{{:., _, [mod, fun]}, _, []}, arity]}} | ||
when is_atom(fun) and is_integer(arity) -> | ||
case mod do | ||
atom when is_atom(atom) -> | ||
{:ok, {atom, fun, arity}} | ||
|
||
{:__aliases__, _, list} when is_list(list) -> | ||
{:ok, {list |> Module.concat(), fun, arity}} | ||
|
||
_ -> | ||
{:error, "cannot parse MFA"} | ||
end | ||
|
||
_ -> | ||
{:error, "cannot parse MFA"} | ||
end | ||
end | ||
end |
Oops, something went wrong.