One useful debugging tool is the development shell.
When invoked this command will unpack and patch the source and open a terminal.
The command format is:
bitbake -c devshell <package_recipe>
Example: bitbake -c devshell busybox
Inside this new terminal (‘devshell’) we have a full development environment where we can execute commands.