Repository navigation
Add support for fish_trace variable to trace execution - #6255
Conversation
|
This is fantastic! Presumably it can be set non-interactively at the start of some function to aid with debugging long-running or troublesome scripts? Would be amazing if in future this could also support timing information to really help us drill down into where our scripts are slow (I'm thinking in terms of optimising startup time, |
|
Nice, this should be useful for quick debugging.
It prints @zx8 |
This adds support for `fish_trace`, a new variable intended to serve the same purpose as `set -x` as in bash. Setting this variable to anything non-empty causes execution to be traced. In the future we may give more specific meaning to the value of the variable. The user's prompt is not traced unless you run it explicitly. Events are also not traced because it is noisy; however autoloading is. Fixes fish-shell#3427
|
Let's suppress it for key bindings for now and see if anyone complains. |
1f8f0b5 to
a7f1d2c
Compare
This adds support for
fish_trace, a new variable intended to serve the same purpose asset -xas in bash. Setting this variable to anything non-empty causes execution to be traced; it looks a lot like theset -xof bash.This is a basic facility for now; in the future we may make it fancier through interpreting the value of the variable.
The user's prompt is not traced (unless you run it explicitly). Events are also not traced because it is noisy. However key bindings and autoloading is traced.
Fixes #3427