Is this checkbox in your myApp.exe or an outside application? If it is part of myapp.exe, can't you just run through the same logic that happens at start up to turn on/off the debugging?

If it is outside your application, you can set your application to be a single instance and catch the appropriate event when something tries to launch a new instance. I think it is the StartupNextInstance event, but it has been a while since I have done that, so you might need to double check that.