You mean like a print()
statement? It isn’t designed for that sort of thing, because once the package is a dependency, it might be loaded multiple times for different versions while the dependency graph is being resolved—even multiple times at once.
If you are trying to debug something, swift package
has subcommands like describe
, dump‐package
and show-dependencies
. swift package --help
will show you the complete list of available commands.