Automatically switch to debug mode on localhost