how to debug fish script?

2019-06-25 23:26发布

问题:

You can debug a bash script like this:

bash -x script [arg1 ...]`

Question

What is the fish equivalent?

回答1:

Fish use a similar flag system:

fish -d 3 script.fish

Where d is the debug flag followed by the verbosity level:

-d or --debug-level=DEBUG_LEVEL specify the verbosity level of fish. A higher number means higher verbosity. The default level is 1.