1. A method for debugging a computer program comprising: selecting, in a virtual machine controlled by a hypervisor in a host operating system, a guest memory location as a breakpoint location; determining, in the virtual machine, a first memory page that contains the guest memory location; replacing, by the hypervisor without knowledge by a computer program executed by the virtual machine, at least a portion of the first memory page with new content, the new content including a breakpoint instruction; translating virtual memory to physical memory; and in response to the replacing, setting a permission of the first memory page to execute only, such that attempts to read to or write from the first memory page by the computer program are intercepted by the hypervisor.