How can I write a simple debugger for Windows? I need to launch another program (do not attach to an already running one, but launch it yourself) then to let it run and to catch it at a certain address. Moreover, the breakpoint must be set via hardware debugging registers, not by just 0xCC. I did not find any source code for an example of such thing over the Internet, alas.
Not exactly an RE question but MSDN has an example of the main loop. I also found this tutorial: