Opening wp-config.php to check one constant means scrolling past the salts and the comments. WP-CLI can list just the part I ask for.
wp config list lists the variables, constants and file includes defined in wp-config.php, as a table with key, value and type. Add a name, or part of a name, as a filter:
wp config list WP_DEBUG
Without --strict the filter matches partial names, so this gives every entry with DEBUG in its name:
wp config list DEBUG
With --strict only exact names match, and you can pass several:
wp config list WP_DEBUG WP_DEBUG_LOG --strict --fields=key,value
The formats are table, csv, json, yaml and dotenv, and dotenv is limited to non-object values. --config-file=<path> reads another file than wp-config.php in the WordPress root. That option was added in WP-CLI 2.6.0, according to the docs.
A plain wp config list prints the database password and the salts too, as the docs example shows. Do not run it during a screen share or paste its output into a forum post or chat. Filter first.
The command reads the file, not the running site. A constant defined somewhere else will not show up.
Further reading: wp config list (WP-CLI handbook)