Sometimes there are needs to measure mains voltages with oscilloscope. You must be very careful when measuring voltages on the mains with any measurement instrument. The mains voltages are absolutely deadly. Measuring mains voltages with multimeter can be dangerous. Trying to do the measurement of mains voltage with oscilloscope is potentially more dangerous, because typically oscilloscopes are are grounded devices that have the ground side of the probe connected to the equipment case. Doing connection to mains voltage slightly wrongly can end up causing short circuit, damage the probe, your oscilloscope or electrocute you.
If you are using a traditional oscilloscope that is mains powered, ALWAYS MAKE SURE YOUR SCOPE IS GROUNDED BECAUSE THE GROUND IS THERE FOR YOUR SAFETY!
Usually my first choice when needing to measure mains voltage with oscilloscope is to use a completely isolated scope-meter. I have UT-81B scope-meter for this purpose. I can use it with multimeter probes just like a normal multimeter, but get oscilloscope view on the it’s screen.
If I need to use my mains powered desktop oscilloscope, then my first choice is to use a CAT rated differential probe which has been designed to measure the voltage levels I want to measure. That’s the best choice.
I do not want to connect my normal oscilloscope probes anywhere near the device that is powered directly from mains outlet. In some cases I might consider doing measurement to mains voltage devices if I can power the device under test through mains isolation transformer.
Here are some videos on measuring mains voltage with oscilloscope: