not tested. maybe try the following:
type VLIDE in command line to start the code editor. on menu, click "Debug" and then check "Break On Error". leave the editor open and open another drawing, when error occurs, press Ctrl+F9, and see what happens in the code editor. it should jump to the line where problem exists.