debug mode works with gui