Skip to navigation Skip to main content
These docs are for an upcoming version of Build Awesome — take extra care before linking here as URLs may change! Look to the latest stable docs instead (or the full release history).

Debug Mode

On this page

Having trouble? Want to see what Build Awesome is doing behind the scenes? Use DEBUG mode. We’re taking advantage of the excellent debug package for this.

debug will tell you exactly what directories Build Awesome is using for data, includes, input, and output. It’ll tell you what search globs it uses to find your templates and what templates it finds. If you’re having trouble, enable this.

You can enable this feature by using the DEBUG environment variable. To do this we add some text before the command we use to run Build Awesome.

Commands

The commands below assume that Build Awesome is installed locally (recommended) but you can learn more about the difference between Local and Global installation.

macOS or Linux (et al)

DEBUG=BuildAwesome* npx @awesome.me/buildawesome

Cross Platform

Use the cross-env package to compatibly set your environment variables cross-platform.

npm install cross-env

Now add an npm script in your package.json, unlocking npm run debug:

{
	"scripts": {
		"debug": "cross-env DEBUG=BuildAwesome* npx @awesome.me/buildawesome"
	}
}

Windows

Read more about Windows environment variables.

cmd.exe

set DEBUG=BuildAwesome* & npx @awesome.me/buildawesome

Powershell (default in VS Code)

$env:DEBUG="BuildAwesome*"; npx @awesome.me/buildawesome

Learn More

Read more at the debug package documentation.

Try with --dryrun

Works great with --dryrun if you want to run Build Awesome but not actually write any files.

View all messages

The commands above limit the messages from debug to Build Awesome specific things with DEBUG=BuildAwesome* but you can view all of the messages from any dependency with DEBUG=*.

Analyze Performance

Read more about how to use debug to analyze the performance of your build.

Debug individual variables

In addition to using debug, you can use the global filter log to console.log anything from inside a template file.