Some changes to enable debugger support and more verbose logging