Add verbose debug logging for bug 39996

Change-Id: I1492f45c9168c4d080d27dde61997edace36dd6e
(cherry picked from commit 4ac079bb53f94192187b2586ffce05acaecaa674)