The applicability of the inductive method or the scanning permanent magnet method to the crack detection in a high-temperature superconducting (HTS) film is investigated by means of numerical simulation. To this end, a numerical method is proposed for calculating the shielding current density in an HTS containing a crack. In the method, the integral form of Faraday's law is forced to be numerically satisfied by applying the virtual voltage along the crack surface. A numerical code is developed on the basis of the proposed method and the influence of a crack on both methods is numerically investigated. The results of computations show that, in the inductive method, the crack position can be roughly detected from the accuracy degradation of the estimated critical current density. On the other hand, in the scanning permanent magnet method, it can be determined more accurately by scanning an HTS film in two opposite directions.