Connects a session to the main thread inspector back-end. An exception will be thrown if this API was not called on a Worker thread.