Suggestion to add debug mode to sed

"[email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
 Sven's discussion about sedsed got me thinking. Wouldn't it be helpful if sed had a debug mode? The sedsed output style could serve as a starting point and be perhaps improved on. However, the basic idea would be similar. 
 

 sedsed, for all it's usefulness and high quality, seems last updated 2004, and is not complete. Also, it seems a debugger written as part of the sed C source code would have much greater potential than using python to somehow write a sed debugger, which I really don't even understand how it works, maybe it uses python (not C) as the source code language (?).
 

 The sed command line options for debug mode might be something like:
 

 --debug DEBUGFILE
 

 --hide PAT
 --hide HLD
 --hide CMD
 

 ==================
 

 sedsed has some additional options that I'm not particularly interested in, would personally never use, and I am not suggesting or requesting to add:
 

 -H, --htmlize     converts sed script to a colorful HTML page
 

 -i, --indent        script beautifier, prints indented and
                         one-command-per-line output do STDOUT
 

 --color              shows debug output in colors (default: ON)
 

 If there were a debug mode, I think the focus should be on debugging, showing exactly what sed is doing.
 

 ===================
 

 I like that sedsed allows suppression (--hide) of printing out certain repetitive debug information, to cut down on clutter.
 

 My guess is that a sed debug mode would also be useful for any sed maintainer. When I write any kind of non-trivial C software, I always include a debug mode.
 

 So, if the GNU sed maintainer is listening, I would like to make the suggestion. If a different way I need to make the suggestion, could someone please forward this post as needed, or steer me in the right direction?
 

 Any other thoughts about this? What am I missing?
 

 Daniel
 

 PS - I only mention GNU sed because that is what I use, the sed I consider to be the best. Any sed having a debug mode seems a good idea to me.
 



[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.