This can be needed if the error or warning message can not be reproduced in SAPGUI directly for testing. All you need is set up the user in SU3 with the Parameter BSPWD_USER_LEVEL to 5.
Then you reproduce the issue in WebUI and place the cursor over the message. It will display the message ID and number as shown in below picture for message ID PRC_PRI number 801:
See also note 1129007: Display of technical message data in CRM WebClient UI
Once you have identified technical message date you can also use t-code SE91 in SAPGUI and check the 'where used button' for the relevant message, if the message is not found it can mean it was triggered dynamically or originates for e.g. from ECC.