diff --git a/examples/opengl/contextinfo/contextinfo.pro b/examples/opengl/contextinfo/contextinfo.pro
index 3d948dd282..1b07b806c8 100644
--- a/examples/opengl/contextinfo/contextinfo.pro
+++ b/examples/opengl/contextinfo/contextinfo.pro
@@ -1,7 +1,7 @@
 TEMPLATE = app
 QT += widgets
 requires(qtConfig(filedialog))
-
+CONFIG += console
 SOURCES += main.cpp \
            widget.cpp \
            renderwindow.cpp
diff --git a/examples/opengl/contextinfo/main.cpp b/examples/opengl/contextinfo/main.cpp
index 88ab4a7334..6c06cd135f 100644
--- a/examples/opengl/contextinfo/main.cpp
+++ b/examples/opengl/contextinfo/main.cpp
@@ -49,17 +49,29 @@
 ****************************************************************************/
 
 #include <QApplication>
+#include <QDebug>
 #include "widget.h"
 
 int main(int argc, char **argv)
 {
     for (int i = 1; i < argc; ++i) {
-        if (!qstrcmp(argv[i], "-g"))
+        qDebug() << argv[i];
+        if (!qstrcmp(argv[i], "-g")) {
+            qDebug() << "AA_UseOpenGLES";
             QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
-        else if (!qstrcmp(argv[i], "-s"))
+        } else if (!qstrcmp(argv[i], "-G")) {
+            qDebug() << "QT_OPENGL angle";
+            qputenv("QT_OPENGL", "angle");
+        } else if (!qstrcmp(argv[i], "-s")) {
+            qDebug() << "AA_UseSoftwareOpenGL";
             QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
-        else if (!qstrcmp(argv[i], "-d"))
+        } else if (!qstrcmp(argv[i], "-d")) {
+            qDebug() << "AA_UseDesktopOpenGL";
             QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
+        } else if (!qstrcmp(argv[i], "-D")) {
+            qputenv("QT_OPENGL", "desktop");
+            qDebug() << "QT_OPENGL desktop";
+        }
     }
 
     QApplication app(argc, argv);
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 7d621126b9..88d811ab4b 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -389,6 +389,7 @@ QWindowsWindow *QWindowsIntegration::createPlatformWindowHelper(QWindow *window,
 QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate()
 {
 #if defined(QT_OPENGL_DYNAMIC)
+    qDebug() << __FUNCTION__;
     QWindowsOpenGLTester::Renderer requestedRenderer = QWindowsOpenGLTester::requestedRenderer();
     switch (requestedRenderer) {
     case QWindowsOpenGLTester::DesktopGl:
@@ -450,12 +451,13 @@ QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate()
 
 QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::create()
 {
+    qDebug() << __FUNCTION__;
     return QWindowsStaticOpenGLContext::doCreate();
 }
 
 QPlatformOpenGLContext *QWindowsIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
 {
-    qCDebug(lcQpaGl) << __FUNCTION__ << context->format();
+    qDebug() << __FUNCTION__ << context->format();
     if (QWindowsStaticOpenGLContext *staticOpenGLContext = QWindowsIntegration::staticOpenGLContext()) {
         QScopedPointer<QWindowsOpenGLContext> result(staticOpenGLContext->createContext(context));
         if (result->isValid())
@@ -479,6 +481,7 @@ QOpenGLContext::OpenGLModuleType QWindowsIntegration::openGLModuleType()
 
 QWindowsStaticOpenGLContext *QWindowsIntegration::staticOpenGLContext()
 {
+    qDebug() << __FUNCTION__;
     QWindowsIntegration *integration = QWindowsIntegration::instance();
     if (!integration)
         return 0;
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp
index 9a630aff4f..6094d36f72 100644
--- a/src/plugins/platforms/windows/qwindowsopengltester.cpp
+++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp
@@ -202,6 +202,13 @@ QWindowsOpenGLTester::Renderer QWindowsOpenGLTester::requestedGlesRenderer()
 }
 
 QWindowsOpenGLTester::Renderer QWindowsOpenGLTester::requestedRenderer()
+{
+    auto r = requestedRendererI();
+    qDebug() << __FUNCTION__ << "rets" << hex << r;
+    return r;
+}
+
+QWindowsOpenGLTester::Renderer QWindowsOpenGLTester::requestedRendererI()
 {
     const char openGlVar[] = "QT_OPENGL";
     if (QCoreApplication::testAttribute(Qt::AA_UseOpenGLES)) {
@@ -249,6 +256,7 @@ Q_GLOBAL_STATIC(SupportedRenderersCache, supportedRenderersCache)
 
 QWindowsOpenGLTester::Renderers QWindowsOpenGLTester::detectSupportedRenderers(const GpuDescription &gpu, bool glesOnly)
 {
+    qDebug() << gpu.description << "glesOnly=" << glesOnly;
     Q_UNUSED(gpu)
     Q_UNUSED(glesOnly)
 #if defined(QT_NO_OPENGL)
@@ -306,23 +314,26 @@ QWindowsOpenGLTester::Renderers QWindowsOpenGLTester::detectSupportedRenderers(c
         result |= DisableProgramCacheFlag;
     }
     srCache->insert(qgpu, result);
+    qDebug() << "returns=" << hex << result;
     return result;
 #endif // !QT_NO_OPENGL
 }
 
 QWindowsOpenGLTester::Renderers QWindowsOpenGLTester::supportedGlesRenderers()
 {
+    qDebug() << __FUNCTION__;
     const GpuDescription gpu = GpuDescription::detect();
     const QWindowsOpenGLTester::Renderers result = detectSupportedRenderers(gpu, true);
-    qCDebug(lcQpaGl) << __FUNCTION__ << gpu << "renderer: " << result;
+    qDebug() << __FUNCTION__ << gpu << "renderer: " << result;
     return result;
 }
 
 QWindowsOpenGLTester::Renderers QWindowsOpenGLTester::supportedRenderers()
 {
+    qDebug() << __FUNCTION__;
     const GpuDescription gpu = GpuDescription::detect();
     const QWindowsOpenGLTester::Renderers result = detectSupportedRenderers(gpu, false);
-    qCDebug(lcQpaGl) << __FUNCTION__ << gpu << "renderer: " << result;
+    qDebug() << __FUNCTION__ << gpu << "renderer: " << result;
     return result;
 }
 
@@ -461,6 +472,7 @@ cleanup:
         UnregisterClass(className, GetModuleHandle(0));
     }
     // No FreeLibrary. Some implementations, Mesa in particular, deadlock when trying to unload.
+    qDebug() << __FUNCTION__ << "rets" << result;
 
     return result;
 #else
diff --git a/src/plugins/platforms/windows/qwindowsopengltester.h b/src/plugins/platforms/windows/qwindowsopengltester.h
index bec87c1f86..37f647c780 100644
--- a/src/plugins/platforms/windows/qwindowsopengltester.h
+++ b/src/plugins/platforms/windows/qwindowsopengltester.h
@@ -96,6 +96,7 @@ public:
 
 private:
     static QWindowsOpenGLTester::Renderers detectSupportedRenderers(const GpuDescription &gpu, bool glesOnly);
+    static Renderer requestedRendererI();
     static bool testDesktopGL();
 };
 
