bash - 如何在 Fish shell 中切换 Debug模式?

标签 bash debugging fish

bash 中,我执行 set -xset +x 启用/禁用 Debug模式。

我知道 how to debug fish script? ,但我想以更精确的方式切换 Debug模式,例如在一个函数中。

问题

Fish shell 中的 set -x/set -x 等价于什么?

最佳答案

提出这个问题后,fish 3.1 增加了fish_trace变量。

因此,set -x(在 fish 中创建一个导出变量),set fish_trace 1 触发调试显示。

在 fish 3.1 之前,没有等效的功能。

关于bash - 如何在 Fish shell 中切换 Debug模式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39892236/

相关文章:

asp.net - windbg 无法加载 sos clr

c++ - 当我的代码到达时我可以得到 "Automatic Breakpoints"吗?

macos - 如何在 Mac 上设置默认 shell,例如 fish ?

linux - 如何仅显示 wget 进度条?

linux - 在 bash 中用星号解析文件

linux - grep 仅在 ":"之后的文本

linux - 需要 bash 帮助的初学者

c++ - 在 Mac OS X 上调试和终止应用程序?

python - pyenv 在激活虚拟环境时不再正确设置路径

null - 如何在fish shell中隐藏多个命令输出?