[TUHS] SDB debugger

Rich Morin rdm at cfcl.com
Mon May 4 02:16:58 AEST 2020


> On May 2, 2020, at 10:45, Larry McVoy <lm at mcvoy.com> wrote:
> 
> ... But truth be known, I'm sort of a printf() debugger.  ...

So am I, and ISTR Brian Kernighan and Larry Wall saying that they are, as well.  Over the years, I've written some scripts to make this less painful.  For example, in Ruby, I use the et() script, as written up in http://wiki.cfcl.com/Projects/Ruby/Phone_Home:

l = %w[ context~  dir_path#  file_path foo.bar  bar[:baz] ]
et(l)

This produces the following output:

some_script:72:in `main'
  context      { :foo => "yada yada yada", ... }
  file_path    "a/b/c"
  foo.bar      :warn
  bar[:baz]    42

I also have a tiny Elixir script, ii/2, which works nicely in pipelines:

...
|> ii(:foo)
...

-r



More information about the TUHS mailing list