ide/watches: Fixed crash on exit when debugging and a watch is present (#879)