In #6098 we added support for AZD_EXT_DEBUG to make it easier to debug extensions, but it doesn't support custom extension commands. Currently, it only works when the extension is invoked through service lifecycle commands like azd up, azd deploy, etc.