nietaki / rexbug

A thin Elixir wrapper for the redbug Erlang tracing debugger.
https://hexdocs.pm/rexbug/
MIT License
252 stars 15 forks source link

Investigate redbug map support #13

Closed nietaki closed 7 years ago

nietaki commented 7 years ago

After doing some experiments, like

iex(22)> :redbug.start(10, 10,'erlang:term_to_binary(1)')
{85, 1}
redbug done, timeout - 0
iex(23)> :redbug.start(10, 10,'erlang:term_to_binary({A, B})')
{85, 1}
redbug done, timeout - 0
iex(24)> :redbug.start(10, 10,'erlang:term_to_binary([_])')
{85, 1}
redbug done, timeout - 0
iex(25)> :redbug.start(10, 10,'erlang:term_to_binary(#{})')
{:argument_error, :no_matching_functions}
iex(26)> :redbug.start(10, 10,'erlang:term_to_binary(#\{\})')
{:bad_type, {:map, []}}
iex(27)> '#\{\}'
'\#{}'
iex(28)> i '#\{\}'
Term
  '\#{}'
Data type
  List
Description
  This is a list of integers that is printed as a sequence of characters
  delimited by single quotes because all the integers in it represent valid
  ASCII characters. Conventionally, such lists of integers are referred to as
  "charlists" (more precisely, a charlist is a list of Unicode codepoints,
  and ASCII is a subset of Unicode).
Raw representation
  [35, 123, 125]
Reference modules
  List
Implemented protocols
  Collectable, Enumerable, IEx.Info, Inspect, List.Chars, String.Chars

And looking at the code it looks like redbug doesn't support it.

Talk to the author about if and why that's the case.

nietaki commented 7 years ago

It doesn't seem like redbug supports it right now - but it might be worth to keep an eye on https://github.com/massemanet/redbug/issues/2 .

It would be cool to add support for it later on, I'm closing this for now.