This is definitely possible in case someone is looking to implement it.
What the break point system does is to recompile the module with a case
clause that triggers the breakpoint. Therefore you should be able to get
the behaviour above as long as you change the breakpoint system to compile
a pattern match on those arguments. Please open up an issue and we may be
able to add this on Elixir v1.6.



*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Wed, Jul 26, 2017 at 1:12 PM, Eugene Pirogov <[email protected]> wrote:

> Would it be possible to implement break on a specific function clause?
> Right now it's possible to break on a function with a particular arity:
>
> IEx.Pry.break(Ecto.Repo.Schema, :dump_field!, 6, 100)
>
>
> But usually during debugging I'm waiting for a specific argument to be
> passed, so ideally I'd like to do this:
>
> IEx.Pry.break(Ecto.Repo.Schema, :dump_field!, [_, _, _, :birth_date,
> ~D[1996-12-12], _])
>
>
> Right now every time I get to the break point, I check if the field is
> :birth_date, and the date is the one I'm interested. If they are not – I
> move on to the next break point via continue. It is a manual process, so
> I wonder if it make sense (and also whether it is technically possible) to
> break by matching on argument values.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/elixir-lang-core/ddc62f85-b0bf-4651-b1a0-
> 0bae0594d787%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/ddc62f85-b0bf-4651-b1a0-0bae0594d787%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BqDLhchZcsUmga5OxPOWQ8W1k51MP%3DHzzU8sWod%2BVA4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to