Desed: A Debugger for Sed

栏目: IT技术 · 发布时间: 4年前

内容简介:Demystify and debug your sed scripts, from comfort of your terminal.Desed is a command line tool with beautiful TUI that provides users with comfortable interface and practical debugger, used to step through complex sed scripts.

Desed

Demystify and debug your sed scripts, from comfort of your terminal.

Desed: A Debugger for Sed

Desed is a command line tool with beautiful TUI that provides users with comfortable interface and practical debugger, used to step through complex sed scripts.

Some of the notable features include:

  • Preivew variable values, both of them!
  • See how will a substitute command affect pattern space before it runs
  • Step through sed script - both forward and backwards!
  • Place breakpoints and examine program state
  • Hot reload and see what changes as you edit source code
  • It's name is a palindrome

Install

From source:

git clone https://github.com/soptikha2/desed
cd desed
cargo install --path .

From cargo:

cargo install desed

Dependencies:

Development: rust , cargo

Runtime: sed (GNU version)

Controls

  • Mouse scroll to scroll through source code, click on line to toggle breakpoint
  • j , k , g , G , just as in Vim. Prefixing with numbers work too.
  • b to toggle breakpoint (prefix with number to toggle breakpoint on target line)
  • s to step forward, a to step backwards
  • r to run to next breakpoint or end of script, R to do the same but backwards
  • l to instantly reload code and continue debugging in the exactly same place as before
  • q to quit

FAQ

How does it work?

GNU sed actually provides pretty useful debugging interface, try it yourself with --debug flag. However the interface is not interactive and I wanted something closer to traditional debugger.

Does it really work?

Depends. Sed actually doesn't tell me which line number is it currently executing, so I have to emulate parts of sed to guess that. Which might not be bulletproof. But it certainly worked good enough to debug tetris without issues.

Why sed??

Sed is the perfect programming language, especially for graph problems . It's plain and simple and doesn't clutter your screen with useless identifiers like if , for , while , or int . Furthermore since it doesn't have things like numbers, it's very simple to use.

But why?

I wanted to program in sed but it lacked good tooling up to this point, so I had to do something about it.

Why?

Because it's the standard stream editor for filtering and transforming text. And someone wrote tetris in it!

What is the roadmap for future updates?

I would like to introduce syntax highlighting and add this tools to standard repositories of all major distributions.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

大数据

大数据

涂子沛 / 广西师范大学出版社 / 2013-4-1 / 49.90元

公布官员财产美国是怎么做的,美国能让少部人腐败起来吗,美国式上访是怎么回事,凭什么美国矿难那么少,全民医改美国做得到吗,美国总统大选有什么利器才能赢,下一轮全球洗牌我们世界工厂会被淘汰吗…… 除了上帝,任何人都必须用数据来说话。 大数据浪潮,汹涌来袭,与互联网的发明一样,这绝不仅仅是信息技术领域的革命,更是在全球范围启动透明政府、加速企业创新、引领社会变革的利器。现代管理学之父德鲁克有......一起来看看 《大数据》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具