diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 4bdf3167e4..388e443f35 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -350,6 +350,7 @@ static QSurfaceFormat
     if (pfd.iPixelType == PFD_TYPE_RGBA)
         format.setAlphaBufferSize(pfd.cAlphaBits);
     format.setRedBufferSize(pfd.cRedBits);
+    qDebug() << __FUNCTION__ << "red=" <<pfd.cRedBits;
     format.setGreenBufferSize(pfd.cGreenBits);
     format.setBlueBufferSize(pfd.cBlueBits);
     format.setStencilBufferSize(pfd.cStencilBits);
@@ -395,6 +396,7 @@ static PIXELFORMATDESCRIPTOR
     pfd.cStencilBits = format.stencilBufferSize() > 0 ? format.stencilBufferSize() : 8;
     if (additional.formatFlags & QWindowsGLAccumBuffer)
         pfd.cAccumRedBits = pfd.cAccumGreenBits = pfd.cAccumBlueBits = pfd.cAccumAlphaBits = 16;
+    qDebug() << __FUNCTION__ << pfd;
     return pfd;
 }
 
@@ -424,12 +426,15 @@ static int choosePixelFormat(HDC hdc, const QSurfaceFormat &format,
 
     // 1) Try ChoosePixelFormat().
     PIXELFORMATDESCRIPTOR requestedPfd = qPixelFormatFromSurfaceFormat(format, QWindowsGLDirectRendering);
+    qDebug() << '\n' << __FUNCTION__ << "requestedPfd=" << requestedPfd << '\n';
     initPixelFormatDescriptor(obtainedPfd);
     int pixelFormat = ChoosePixelFormat(hdc, &requestedPfd);
     if (pixelFormat >= 0) {
         DescribePixelFormat(hdc, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), obtainedPfd);
-        if (isAcceptableFormat(additional, *obtainedPfd))
+        if (isAcceptableFormat(additional, *obtainedPfd)) {
+            qDebug() <<  '\n' <<__FUNCTION__ << "ret1=" << pixelFormat << *obtainedPfd<< '\n';
             return pixelFormat;
+        }
     }
     // 2) No matching format found, manual search loop.
     const int pfiMax = DescribePixelFormat(hdc, 0, 0, NULL);
@@ -445,6 +450,8 @@ static int choosePixelFormat(HDC hdc, const QSurfaceFormat &format,
         DescribePixelFormat(hdc, pfi, sizeof(PIXELFORMATDESCRIPTOR), &checkPfd);
         if (isAcceptableFormat(additional, checkPfd)) {
             int score = checkPfd.cColorBits + checkPfd.cAlphaBits + checkPfd.cStencilBits;
+            qDebug() << __FUNCTION__ << "check" << pfi <<'/' <<  pfiMax
+                     << "red=" << checkPfd.cRedBits << "colbits=" << checkPfd.cColorBits;
             if (accumBufferRequested)
                 score += checkPfd.cAccumBits;
             if (doubleBufferRequested == testFlag(checkPfd.dwFlags, PFD_DOUBLEBUFFER))
@@ -507,11 +514,14 @@ static int choosePixelFormat(HDC hdc,
     iAttributes[i++] = TRUE;
     iAttributes[i++] = WGL_COLOR_BITS_ARB;
 
-    iAttributes[i++] = (format.redBufferSize() > 0)
-                       && (format.greenBufferSize() > 0)
-                       && (format.blueBufferSize() > 0) ?
-                       format.redBufferSize() + format.greenBufferSize() + format.blueBufferSize() :
-                       24;
+    int cols = (format.redBufferSize() > 0)
+            && (format.greenBufferSize() > 0)
+            && (format.blueBufferSize() > 0) ?
+            format.redBufferSize() + format.greenBufferSize() + format.blueBufferSize() :
+            24;
+    qDebug() << __FUNCTION__ << "requested cols=" << cols;
+    iAttributes[i++] = cols;
+
     switch (format.swapBehavior()) {
     case QSurfaceFormat::SingleBuffer:
         iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB;
@@ -685,6 +695,7 @@ static QSurfaceFormat
     result.setSwapBehavior(iValues[0] ? QSurfaceFormat::DoubleBuffer : QSurfaceFormat::SingleBuffer);
     result.setDepthBufferSize(iValues[1]);
     result.setRedBufferSize(iValues[3]);
+    qDebug() << __FUNCTION__ << "arb obtained red=" << iValues[3];
     result.setGreenBufferSize(iValues[4]);
     result.setBlueBufferSize(iValues[5]);
     result.setAlphaBufferSize(iValues[6]);
@@ -1128,6 +1139,7 @@ QWindowsGLContext::QWindowsGLContext(QOpenGLStaticContext *staticContext,
             m_pixelFormat =
                 ARB::choosePixelFormat(hdc, *m_staticContext, format,
                                        requestedAdditional, &m_obtainedPixelFormatDescriptor);
+            qDebug() << "ARB::choosePixelFormat=" << m_pixelFormat;
             if (m_pixelFormat > 0) {
                 m_obtainedFormat =
                     ARB::qSurfaceFormatFromHDC(*m_staticContext, hdc, m_pixelFormat,
@@ -1136,8 +1148,10 @@ QWindowsGLContext::QWindowsGLContext(QOpenGLStaticContext *staticContext,
             }
         } // tryExtensions
         if (!m_pixelFormat) { // Failed, try GDI
+            qDebug() << "GDI fallback";
             m_pixelFormat = GDI::choosePixelFormat(hdc, format, requestedAdditional,
                                                    &m_obtainedPixelFormatDescriptor);
+            qDebug() << "GDI obtained=" << m_pixelFormat;
             if (m_pixelFormat)
                 m_obtainedFormat =
                     GDI::qSurfaceFormatFromPixelFormat(m_obtainedPixelFormatDescriptor,
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 287b65cd5d..962ddd920a 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -198,6 +198,7 @@ static inline unsigned parseOptions(const QStringList &paramList,
                 options |= QWindowsIntegration::NoNativeDialogs;
             }
         } else if (param == QLatin1String("gl=gdi")) {
+            qDebug() << __FUNCTION__ << "DisableArb";
             options |= QWindowsIntegration::DisableArb;
         } else if (param == QLatin1String("nodirectwrite")) {
             options |= QWindowsIntegration::DontUseDirectWriteFonts;
