Find OpenSCAD code from image
To my knowledge, OpenSCAD does not have any such feature. However, a related feature might help you: the debugging aid modifier characters. By inserting %, #, !, or * before an object (including aggregate objects), you can control how it renders in relation to the whole file; this makes it possible to do "binary search" type operations to figure out where the object you're seeing is.