It is important to locate a short circuit failure in semiconductor devices, and powerful tools such as lock-in thermography and optical beam induced resistance change are used. However, those tools are inappropriate for investigating the device covered with the impenetrable substance to light, because the covering substance blocks the light from the defect point in the device and also prevents the optical beam from outside of the device. We demonstrate that a subsurface short circuit in a ball grid array device can be located by magnetic field imaging (MFI) and the electromagnetic field reconstruction method (EM-FRM), which makes it possible to calculate a magnetic field in the immediate vicinity of the current that is the source of the field from a measured magnetic field at a distance. Moreover, we visualize the short circuit by three-dimensional X-ray microscopy. MFI is also applied to visualization of a magnetic field created by a current flowing inside a printed circuit board and a light emitting diode package.