set debug mode from global debug mode and disable dumper when debug mode is false.