Search code examples
shelldebuggingscriptingfish

how to debug fish script?


You can debug a bash script like this:

bash -x script [arg1 ...]`

Question

What is the fish equivalent?


Solution

  • 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.