Skip to content

How to Debug Dokan

Liryna edited this page Aug 6, 2015 · 16 revisions

MirrorFS

You can use /d /s options to enable debug output to stderr.

mirror.exe /d /s /r C:\Users /l m

Dokan Driver

Enable logs

Debug output are only enable in debug build. You will need to build yourself the debug version of the driver and install it.

We will need to enable DbgPrint Output into Windows and dokan sys.

Windows

Open (or add, if it's not already there) the key "HKLM\SYSTEM\CCS\Control\Session Manager\Debug Print Filter". Under this key, create a value with the name "IHVDRIVER" Set the value of this key equal to the DWORD value d.

You must reboot for these changes to take effect.

https://www.osronline.com/article.cfm?article=295

Run this command to enable debug mode:

bcdedit -debug on

Dokan sys

You need to run this command at launch of Dokan (or Windows boot).

dokanctl.exe /d 9

Get logs

Download DbgView from Technet here. Enable kernel output with ctrl + K.

You should now be able to see DokanFS output !

Crash Report (BSOD)

After a BSOD, a crash dump is going to be create. This file hold all the information of the crash and very helpful for debugging the driver. To get the crash report, you need to open the report with WinDbg and run thecommand !analyze -v.

Clone this wiki locally