Implement remote debugging.

This is still pretty rough, but it works.

Closes #3.