Fixed references to `debug` library for environments that don't have it loaded.
Fixed `DONE` command to work from fragments loaded with `loop()`.
Fixed `DONE` command to properly stop debugging.
Updated error handling when starting debugging fails due to connection error.
Added connection timeout and exposed `connect` method for customization.
Fixed `DONE` command when executed in scratchpad.