Let me know if I understood wrong what you explained...
If both,device under testing and scope share same ground then HOW can you probe any part of the circuit safely?
My example was: what if ground clip touches by mistake a voltage difference , then ....booom
Once again, sorry but maybe I understood wrong your explanation...
If it is just that you touched a 5v supply rail or similar in the equipment,you now have given the unit a new fault
If the DUT does have a designated "ground",it is probably connected to any metal frame of the device,or on a PCB,a large area of copper.
If the internal "ground"
is connected to the Mains supply Earth,you can actually check various points for the presence of voltage with respect to ground using the probe with the ground lead/clip disconnected,(removed),as the Oscilloscope power cable provides the necessary return path to Earth.
If a voltage
is present,you know you can't put the ground clip on that point!
If you need to critically check waveforms at various points,obviously having several tens of metres of wire between the two Earth points will not give you the best results,so once you have determined the "ground"of your DUT,clip the "ground" clip to that & take all your measurements with respect to that point.
NOTE:I have used the terms "Ground" AND"Earth",as in the DUT,"ground" may simply be a "common" rail with no connection to the Mains Supply "Earth" (or any other part of the Mains).
When the "ground" & "Earth" are connected they become the same thing.
Sometimes it would be nice to see the voltage across a component where both ends are above ground,but this can be calculated if you know the voltage at both ends,or you can measure both ends at the same time w.r.t ground using two channels & use the A-B function on your 'scope.
If,for
any reason,you need to probe the Mains supply,use the "no ground clip" method described above.
WARNING: Not all probes are rated to look at Mains supply voltages,so you will need to be sure of this.
It is probably better at this stage if you leave this till you are more experienced.