Scratch experiments have been used in the past to investigate various contact phenomena such as abrasion mechanisms or asperity contacts. Depending on tip geometries, loading conditions and materials investigated, different crack propagation modes (radial or lateral cracks, etc.) or deformation modes (ploughing, chipping, etc.) may dominate the scratching process. The residual scratch path can yield some information about dominant deformation and fracture modes. It is, however, often not possible to uniquely correlate cracks and other phenomena with events on the recorded load-displacement curves. We have built a miniaturized microscratch device for use inside a scanning electron microscope (SEM) that allows the observation of the surface around the tip with sub-micrometer resolution during scratching. Using a conical indenter with spherical tip we demonstrate on different materials that the device is a powerful tool to observe initiation and propagation of cracks, to observe the flow of the material near the indenter (piling-up and sinking-in) and to study chip and particle formation mechanisms during microscratching. In GaAs, particles were observed to form in front and on the rear side of the tip via interaction of chevron cracks. In the case of a Fe-based bulk metallic glass, shear bands were observed to form in front of the tip leading to serrated chip formation. Discontinuities in the tip penetration during scratching of a polymer thin film were related to the onset of crack formation behind the tip and to the propagation of semi-circular cracks in front of the tip. The observed large elastic recovery of the polymer film at the rear side of the tip has to be taken into account for accurate contact area calculations.