global debugging of the main function