Gino D's GIMP Scripts:
This script is a small utility designed to adapt the name of each object (layer, channel or path) inside an open image by replacing or extending it with a string containing mainly the object's ID, that is the unique integer number whereby the same object is identified within a GIMP session.
By this stratagem, the script allows to quickly obtain such identifiers listed in a convenient manner, side by side with the relevant thumbnails. So that, it will become easier to trace drawables and paths when you need to run or test interactively (through the console) any Script-Fu procedure involving them, since the IDs are required as paramaters indeed.
If a layer is provided with a mask, the resulting name will contain, besides the layer's ID, the one of the layer mask too, with a dash separating them.
In case of the presence of a floating selection, the respective ID will be typed, in rounded brackets, next to the ID of the drawable such floating selection belongs to.
The script has three options.
By means of the option "Affect", you can decide whether the script shall involve the active image only or all the images currently open.
The option "Behavior" permits to choose whether to keep or not, in the object's final name, the original name alongside the string containing the ID.
By checking the option called "Rename Quick Mask too (if active)", even the Quick Mask will be renamed so as to show its ID, though like this such temporary mask will be transformed into a regular channel.
Once installed, you can launch this script from the image menubar through "Image -> Identify Image Objects...".