Yes, you can debug it. After starting the service, open the Task Manager and get the process ID. Then type "msdev -p <pid>" on a command line. If the error happens too quickly (e.g. on startup), put an infinite loop at the very start and break out of it with the debugger. int i=1; while (i > 0 ); is my favorite. Just change i to zero and everything starts going as normal (just don't forget to take it out!). Good Luck, - Mark P.S. I'm using regex in a service and it's working fine (at least I assume it is, nothing noticably bad has happened). MSVC 6, boost_1_30_0, W2K AS and W2K Pro. Koss, Loren wrote:
John,
Thanks for the response. How do you deal with breakpoints within a service? I'm compiling then starting the service from the service control manager. Will I still be able to debug it?
I seem to be having a difficult time using the Regex class in a service. It works wonderfully in a regular app. Can anyone help me out.. Basically, instantiating a regex class raises an exception. Any thoughts?
Not unless you can tell me what exception and where - if you're using the vc ide then set it to break on OS and C++ exceptions.
John.