Fix issue in driver debugger.

When closing only release the profile if it is not a dict.