I have a process that starts and stops based on receiving events. I need to attach CodeDynamics to that process before it exits. Things I'm considering are;
1. force target process into an infinite loop and attach.
a. use a file's disappearance to trigger the loop to break,
b. modify memory to break from the loop.
2. Some way to modify the code so that a debug session of the target application is started.

Question is how to modify memory to cause a loop to break.
Any other simpler alternatives others might have used?
Any example refs or pointers to documentation(examples) that might help?

I did not see any information regarding modifying memory contents in the user's guide other than the discussion of watch points but didn't seem to apply.

Thanks for any information can provide.
Tim