The -10002 error is errAEBadKeyForm. This error indicates that the key form you are using (by name, by index or by id) is not supported by the application in that context. Try switching to another key form on the container element collection:
Generally, the by index key form is always supported. Unfortunately, by index is the least desirable key form as it is not stable across create/delete/move/clone operations (i.e. operations that alter the contents of the containing element collection).
Script Debugger is at the mercy of the application’s meta-data and offers options that may not actually work when the meta-data is inaccurate. That said, reporting the -10002 error code without an explanation isn’t helpful so we’ll improve that in a future maintenance release.