I was using the Erlang trace debugger to see how my string parsing code was being called. The strings are Unicode and so the output was like this…
(<0.101.0>) returned from ‘Elixir.Tinker’:handle/2 -> [<<226,191,178>>,
[<<230,173,162>>,
<<232,135,170>>,
<<229,183,179>>,
<<229,133,171>>,
<<229,164,130>>]]
I ran iex --werl but that didn’t affect the debug output. Is it possible to make the Erlang debugger output Unicode strings so that they’re readable, rather than as bitstrings?
Unicode characters and strings do appear in the shell. It’s the output during tracing, where everything displays as bitstrings. Since I’m debugging consuming Unicode strings recursively, it’d be helpful if those bitstrings displayed as Unicode characters.
Which debugging are you using? :dbg? :sys? Note they usually allow you to pass a handler, so you can pass your own handler instead of relying on the default one.