strongloop/node-inspector — pull request #12 by bajtos (2013-05-29 16:10:38+00:00)
Title: WIP - Code clean-up

Move any remaining session.js methods related to front-end/back-end commands and events to appropriate Agent classes, remove unused code, perhaps improve test coverage of Agents.

**Design/architecture target**
Agent classes should not depend on session, they should take two dependencies instead:
- `debuggerClient` for sending requests to debugger
- `frontendClient` for sending events to front-end
Handling of debugger events (mainly `break` and `exception`) should be probably moved somewhere else too. We can either create a new class, or allow Agents to register for these events.

As the result, the Session class should be very simple, it should hold reference to agents & clients and do the small amout of work related to session setup & teardown, handling of closed front-end and debugger connection, etc.