There are a few ways to do it. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/htm l/_atl_using_debugbreak.asp
Add "_asm int 3;" where you want to break. Use a dialog to pause execution until you can attach the debugger to it: #ifdef _DEBUG char szMessage [256]; wsprintf (szMessage, "Please attach a debbuger to the process 0x%X (%s) and click OK", GetCurrentProcessId(), argv[0]); MessageBox(NULL, szMessage, "CGI Debug Time!", MB_OK|MB_SERVICE_NOTIFICATION); #endif Or add a registry key (only works with dlls). I can't find it in the MSDN right now, but it's set up in \\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<exe or dll filename> then just add a DWORD type entry named BreakOnDllLoad 1 breaks 0 does not break when the dll is loaded. Basically debugging is based on your ability to stop exection or attach to a running process. Hopefully I've given you a few good starting places. > -----Original Message----- > From: Jon [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 04, 2002 6:39 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DEV] Development FAQ? > > > Hello, > > Is there a PHP Dev FAQ somewhere? > > If not, then I would like to ask your help. > > I have PHP set up and compiling on my Win2k box. My question is, how do I > debug php.exe while it's running as a CGI application? Can you > give me some > tips on how to set up my environment for debugging? > > Thanks, > > Jon > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php