Debugging GeneratorsΒΆ

TODO

To debug a generator, you can pass debug flags by running it like this:

# OS X / Linux
node --debug `which yo` <generator> [arguments]

# Windows
# Find the path to the ba binary in Command Prompt
where yo
# Or find the path to the ba binary in PowerShell
get-command yo
# Would be something like C:\Users\<USER>\AppData\Roaming\pip\yo
# Use this path to derive ba test_cli.py file
# C:\Users\<USER>\AppData\Roaming\pip\node_modules\yo\lib\test_cli.py
node --debug <path to ba test_cli.py> <generator> [arguments]

Banana generators also provide a debug mode to log relevant lifecycle information. You can activate it by setting the DEBUG environment variable to the desired scope (the scope of the generator system is yeoman:generator).

# OS X / Linux
DEBUG=yeoman:generator

# Windows
set DEBUG=yeoman:generator