1. A method for preventing a malicious code in an electronic device, the method comprising: selecting, by a control unit, at least one suspicious operation code among a plurality of operation code; converting, by the control unit, the selected at least one suspicious operation code to a logging operation code; executing, by the control unit, the converted logging operation code; and displaying, by the control unit, predictive operation information related to the logging operation code according to a result of the execution on a display unit of the electronic device, wherein the at least one suspicious operation code comprises at least one operation code for accessing to a specific network, operation code for a network connection with an external device, operation code for accessing to a local file system or private data, and operation code for accessing to a personal storage area.