Skip to content

Commit

Permalink
chore(cli): Add debug help (#1736)
Browse files Browse the repository at this point in the history
* chore(cli): Add debug help

* fmt
  • Loading branch information
pepoviola authored Feb 29, 2024
1 parent bdf7138 commit 6da2bf7
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/src/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,26 @@ Commands:
version Prints zombienet version
help [command] display help for command

Debug:
The debug/verbose output is managed by the DEBUG environment variable, you can enable/disable specific debugging namespaces setting an space or comma-delimited names.
$ e.g $ DEBUG=zombie, zombie::paras zombienet spawn example/0001-example.toml

The available namespaces are:
zombie
zombie::chain
zombie::cmdGenerator
zombie::config
zombie::helper
zombie::js
zombie::kube
zombie::metrics
zombie::native
zombie::network
zombie::paras
zombie::podman
zombie::spawner
zombie::substrateCliArgsVersion
zombie::test

NOTE: wildcard (e.g.'zombie*') are supported, for advance use check https://www.npmjs.com/package/debug#wildcards
```
29 changes: 29 additions & 0 deletions javascript/packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,35 @@ program
process.exit(0);
});

program.addHelpText(
"after",
`
Debug:
The debug/verbose output is managed by the DEBUG environment variable, you can enable/disable specific debugging namespaces setting an space or comma-delimited names.
$ e.g $ DEBUG=zombie, zombie::paras zombienet spawn example/0001-example.toml
The available namespaces are:
zombie
zombie::chain
zombie::cmdGenerator
zombie::config
zombie::helper
zombie::js
zombie::kube
zombie::metrics
zombie::native
zombie::network
zombie::paras
zombie::podman
zombie::spawner
zombie::substrateCliArgsVersion
zombie::test
NOTE: wildcard (e.g.'zombie*') are supported, for advance use check https://www.npmjs.com/package/debug#wildcards
`,
);

program.parse(process.argv);

function asyncAction(cmd: Function) {
Expand Down

0 comments on commit 6da2bf7

Please sign in to comment.