Problem using Windbg for debugging Printer Driver User-Mode

Hello Everyone

I am a new member of this Group,
I am abhishek from delhi, india involved in device driver development. I have been told how helpful people are in these groups so I seek some solutions and hopt to provide some in my future endevaours.

After some exploration I have finally understood that for printer drivers that local debugging for printer driver is not possible since the process that loads the driver is CSRSS.exe. and that if halted freezes the system.

This driver captures the print output and generates a image. Hence it captures image from any application that can send an image. I have developed the application so far without debugging support.

Now I want to know that if i want to perform remote debugging for my printer driver what should the settings be for the following scenario?

I have set the symbol path to the microsoft server. Somewhere in the help its mentioned that the application would be build with codeview (*.pdb) file. Now in my case I have a user-mode printer driver dll called umdrvabhi.dll
I also have a kernel mode dll called kmdrvabhi.dll
and user interface dll abhidrvui.dll. Well I am not aware how to build these DLL so that windbg can get the complete debug information.

My ddk is installed on d:\ddk

And my source are at the following folders

Kernel: d:\mywork\km\src\kmdrv.c
User : d:\mywork\um\src\umdrv.c
Interface: d:\mywork\ui\src\imdrv.c

Now i use checked build to build all the sources using the command “build -cZ”
the dll build are then sent to c:\winnt\system32\spool\driver…wx382\2 directory
Then I load any application and call the print command and select my printer driver for printing.

What I want to confirm is that the process ID i would give would be that of the application printing? i.e. if i use word then the process ID word would be attached? Please clear me as to which process ID I should attach inorder to debug my application?

I have tried attaching the windbg to the process file but it does not open my source and provide source level debugging
Rather some binary debugging gets opened? what could be the reason? is it that I should set breakpoints before and then start the application process?

I would seeking your ernest +ve reply ASAP

Thanking you
Abhishek Gattani