Scan in Debug Mode to Troubleshoot

Run cnspec in debug mode for troubleshooting assistance

If a cnspec scan isn't behaving as expected, you can run it in debug mode to capture detailed information about what happened. Debug mode creates files that you can share with Mondoo support to help diagnose the problem.

Run a debug scan

To scan in debug mode, set the DEBUG=1 environment variable before the cnspec scan command:

DEBUG=1 cnspec scan

You can use debug mode with any scan target. For example, to debug an AWS scan:

DEBUG=1 cnspec scan aws --region us-east-1

Or an Oracle Cloud Infrastructure scan:

DEBUG=1 cnspec scan oci

To learn more about scan targets, read the cnspec scan CLI reference.

Debug output files

cnspec creates debug data files in the directory from which you run the scan. All debug file names begin with mondoo-debug, making them easy to identify.

Run your debug scan from an empty directory so the debug output files are easy to find and collect.

Share debug files with Mondoo

To get troubleshooting help, send all files beginning with mondoo-debug to Mondoo support.

Debug output files can contain sensitive data. Do not share them anywhere public, such as a public repository or channel.

Learn more


On this page