DbgSrv as default debugger?

Hello all,

I have dbgsrv running on remote target machine, and I was wondering if
it is possible to have DbgSrv act as my default debugger? It is a bit
difficult to attach a debugger to my certain service, so what I would
like to do is force an exception in my code, and then have dbgsrv
catch it. Then, I would like to attach to it using windbg from my
development machine. Can this be done?

Thanks,
J

I’m a little confused:

a.) Are you trying to do this with a kd session or a user mode session? I think that you mean user mode, but as services are sometimes debugged using a kd session, I just want to be sure.

b.) Assuming that you mean user mode, do you mean like a just-in-time sort of arrangement?

mm

oh sorry. I forgot to specify. I am trying to do this in user-mode.
I am remote debugging a windows service, but I would like to do a
just-in-time debugging. So, only in a specific case, I would like to
force a break and when this happens, I would like to catch it with my
remote debugger.

On Mon, May 24, 2010 at 12:12 PM, wrote:
> I’m a little confused:
>
> a.) ?Are you trying to do this with a kd session or a user mode session? ?I think that you mean user mode, but as services are sometimes debugged using a kd session, I just want to be sure.
>
> b.) ?Assuming that you mean user mode, do you mean like a just-in-time sort of arrangement?
>
> mm
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

I have no idea of whether you might be able to convince dbgsrv to do this or not, but I would take a look at this first:

http://msdn.microsoft.com/en-us/library/ff541402(VS.85).aspxx

(starts here: http://msdn.microsoft.com/en-us/library/ff540613(VS.85).aspx)

If you use ‘ntsd,’ you can cause it to start a process server.

Also, in case you’re interested, you could also debug this using VS.

Good luck,

mm