Since the control signal 5 is outputted from the built-in chip B20 which is in the same semiconductor device 1, the permission/prohibition control of the debugger connection to the built-in chip A10 can be performed without increasing hardware such as an access key register, a resource access circuit, etc., and without complicating software of the debugger 2.