Discussion:
Suggestion to add debug mode to sed
dgoldman@ehdp.com [sed-users]
2016-01-19 21:05:58 UTC
Permalink
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]
Sven Guckes maillists-yahoo@guckes.net [sed-users]
2016-01-19 22:19:45 UTC
Permalink
Post by ***@ehdp.com [sed-users]
Sven's discussion about sedsed got me thinking.
Wouldn't it be helpful if sed had a debug mode?
If there were a debug mode, I think the focus should
be on debugging, showing exactly what sed is doing.
yes - a debug mode certainly is a great feature.
sed should have that, too! :)
Post by ***@ehdp.com [sed-users]
My guess is that a sed debug mode would also be useful for any sed maintainer. ..
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?
i just updated my info on the sed packages.. (BCC to Clint.)

Sven
--
[2016-01-19]
SED HomePage: http://www.gnu.org/software/sed/
SED ChangeLog: http://metadata.ftp-master.debian.org/changelogs/main/s/sed/unstable_changelog
SED SourceCode: https://sources.debian.net/src/sed/unstable/
SED packages maintenance:
Debian:
packages http://packages.qa.debian.org/s/sed.html
packages https://packages.debian.org/src:sed
tracker https://tracker.debian.org/pkg/sed
binaries https://packages.debian.org/unstable/sed
Maintainer: Clint Adams clint at debian dot org
o-o-stable 4.2.1-7 https://packages.debian.org/source/oldoldstable/sed
oldstable 4.2.1-10 https://packages.debian.org/source/oldstable/sed
stable 4.2.2-4 https://packages.debian.org/source/stable/sed
testing 4.2.2-6.1 https://packages.debian.org/source/testing/sed
unstable 4.2.2-6.1 https://packages.debian.org/source/unstable/sed
dgoldman@ehdp.com [sed-users]
2016-01-21 17:42:15 UTC
Permalink
Thanks. That's one enthusiastic "yes".


Does anybody else have an opinion on this idea of adding a debug mode to sed (with GNU sed as priority), with appropriate command line options to enable it?


Daniel



[Non-text portions of this message have been removed]

Loading...