The debug command provides a convenient alias to start the development server with Node.js debugging enabled.
Simple command that redirects to the development server with debugging enabled.
/**
* Debug command that aliases to 'egg-bin dev --inspect'
* Extends Artus CLI Command directly for simple redirection
*/
class DebugCommand extends Command {
/** Injected Artus CLI utilities */
utils: Utils;
/**
* Executes debug command by redirecting to dev with --inspect
* Uses Artus CLI utils.redirect for command delegation
*/
run(): Promise<void>;
}Usage Examples:
# Start debug server (equivalent to 'egg-bin dev --inspect')
egg-bin debug
# All other options should be passed to dev command directly
egg-bin dev --inspect --port 8000 --workers 2The debug command uses Artus CLI's built-in redirection mechanism:
/**
* Artus CLI redirection interface
* Allows commands to delegate to other commands with additional arguments
*/
interface CommandRedirection {
/** Redirect to another command with specified arguments */
redirect(args: string[]): Promise<void>;
}The debug command integrates seamlessly with the development server:
dev --inspect commandNote: For advanced debugging scenarios, use egg-bin dev --inspect or egg-bin dev --inspect-brk directly with additional options as needed.