An agent for diagnosing cancer comprising, as an active ingredient, a compound represented by the following formula (I) (R1 represents hydrogen atom, or a substituent; R2 to R7 represent hydrogen atom, hydroxyl group, an alkyl group, or a halogen atom; R8 and R9 represent hydrogen atom, or an alkyl group; and X represents a C1-C3 alkylene group), which specifically emits fluorescence in a cancerous tissue within a short time when applied to a part in which presence of a cancerous tissue is suspected.