jueves, 3 de abril de 2008

Debugging a Windows Vista Credential Provider with Visual Studio 2008 (Without Kernel Debugging!)

I have spent the past couple of weeks working on a multifactor biometric Vista Credential provider. I downloaded the most recent sample code here and went through the steps outlined in that download's readme to set up kernel debugging between my Vista 64 host dev machine and my Vista 32 VM target machine through a VMWare named pipes serial port. I was able to break into the debugger successfully when LogonUI.exe was loaded and I could send command line debugger commands with no problems. However, I am not an expert with these low level debuggers and as hard as I tried, I couldn't get the graphical debugger going, I could only work through the command line and didn't like it one bit. I believe it has something to do with the fact that I was piping the user mode debugger through KITL.

In any case, I decided to give a shot to "standard" Visual Studio 2008 remote debugging for this scenario. I installed the VS 2008 remote debugger on the target VM and set it up for remote debugging through the shared network connection. It worked like a charm, though it has one caveat that I haven't solved yet (but can live with to get standard VS debugging):

  • I can only attach to LogonUI's process after it has launched. This means I cannot set a breakpoint in my Credential Provider's initialization methods. So if I have to debug that I have to fall back to the command line debugger.

Other than that, it works nicely and it is a much more productive way of debugging a Vista Credential Provider.

2 comentarios:

  1. I feel your pain, I've been working on the exact same thing, there are few examples and they dont even come close to what is needed. Now were having problems with server 2008... if you wanna chat or compare code let me know.

    ResponderEliminar
  2. I feel your pain, i've been working on the exact same thing, but using the kernel debugger, very time consuming. I would love to compare code since there isnt much out there about vista credential providers...

    ResponderEliminar