Re: Debugging a service - without rebooting?
From: Catherine Rees Lay (spamtrap_at_polyhedron.org.uk)
Date: 03/29/04
- Next message: Bjørge Sæther: "Re: Difference between ZERO and MINUS ZERO ?"
- Previous message: AlanGLLoyd: "Re: De-Activate Taskbar Button"
- In reply to: David Reeve: "Re: Debugging a service - without rebooting?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Mar 2004 13:23:43 +0100
In article <ea69c.125939$Wa.110872@news-server.bigpond.net.au>, David
Reeve <dree4456@big-pond.net.au> writes
>
>"Catherine Rees Lay" <spamtrap@polyhedron.org.uk> wrote in message
>news:PicLTiB9eAZAFwxT@spamtram.polyhedron.com...
>> Sorry, I seem to be asking rather a lot of questions at the moment!
>>
>> I currently have a problem with rebuilding and debugging my service
>> application. This is what happens from scratch (service not installed at
>> all):
>>
>> Install service from command prompt with /INSTALL and start it in the
>> Services window
>> Use Attach to Process to run/debug service app. This works fine.
>> Oh dear there's a bug in my service app. Fix it and recompile. "Unable
>> to create exe file".
>> Fine since service is still running. Stop it (in Services) and
>> recompile. No error messages.
>> Start service again (in Services)
>> Use Attach to Process. "Source has been changed. Rebuild?"
>> If I say Yes, I just go round the loop again. If I say No it runs quite
>> happily but I have no breakpoints (so not much use for debugging) and
>> I'm reasonably sure it's actually running the previous version.
>>
>> Last option: command prompt and /UNINSTALL. Says it works, but if I
>> subsequently try to do /INSTALL it says "This service has been marked
>> for deletion" and won't do it until the machine is rebooted.
>>
>> Surely I don't have to reboot each time I change my service app code?
>> Right now my only option would seem to be a testbed project which isn't
>> a service and put it back into my service app once it's fully debugged.
>> But in that case the facility to debug a service seems pretty useless.
>>
>> I'm running Windows 2000 Pro and Delphi 7.
>>
>> Any suggestions welcome - I can upgrade my OS if that's the problem, but
>> would prefer not to otherwise!
>>
>
>Hmmm.... seem to remember something about this in help. Have you looked for
>services, debugging? There is no entry for debugging, services (at least in
>D5)
>
>Seems your problem is to do with installing the service. Try this from
>help....
>
>"1 First, launch the application in the debugger. Wait a few seconds until
>it has finished loading.
>2 Quickly start the service from the control panel or from the command line:
>
>net start MyServ
>
>You must launch the service quickly (within 15-30 seconds of application
>startup) because the application will terminate if no service is launched."
>
>Dave
>
Sadly, this doesn't work either - the application just terminates. My
suspicion is that the service I've started is the old, previously
installed one and the newly compiled one doesn't link to it.
The D7 help does have help on debugging service applications, which have
as the 2 alternatives what I did initially, and what you suggest. Either
works provided the service installed with /INSTALL is the identical
version to that I'm trying to debug. But there's no help on how to
recompile the service's executable and then debug that without a reboot
between uninstalling the old service and installing the fixed version.
I'm starting to think it can't be done. But I'd still like to know if
this limitation exists under XP.
Thanks,
Catherine.
-- Catherine Rees Lay To email me, use my first name in front of the "at".
- Next message: Bjørge Sæther: "Re: Difference between ZERO and MINUS ZERO ?"
- Previous message: AlanGLLoyd: "Re: De-Activate Taskbar Button"
- In reply to: David Reeve: "Re: Debugging a service - without rebooting?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|