From db031424c28ecbb84ae7f30564719aca0c07a354 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 5 Nov 2023 12:41:17 +1000 Subject: [PATCH] Fix webengine remote debugging in Qt6 https://github.com/ankitects/anki/pull/2806 + Enable remote debugging with run.bat, like in run. It doesn't allow overriding - someone who better knows .bat scripts will need to handle that if they need it. --- run | 2 ++ run.bat | 2 ++ 2 files changed, 4 insertions(+) diff --git a/run b/run index 99e8db79c..fd65a70c7 100755 --- a/run +++ b/run @@ -7,6 +7,8 @@ export PYTHONPYCACHEPREFIX=out/pycache # define these as blank before calling the script if you want to disable them export ANKIDEV=${ANKIDEV-1} export QTWEBENGINE_REMOTE_DEBUGGING=${QTWEBENGINE_REMOTE_DEBUGGING-8080} +export QTWEBENGINE_CHROMIUM_FLAGS=${QTWEBENGINE_CHROMIUM_FLAGS---remote-allow-origins=http://localhost:$QTWEBENGINE_REMOTE_DEBUGGING} + # The pages can be accessed by, e.g. surfing to # http://localhost:40000/_anki/pages/deckconfig.html # Useful in conjunction with tools/web-watch for auto-rebuilding. diff --git a/run.bat b/run.bat index 56ae269f4..d9d6e39ae 100755 --- a/run.bat +++ b/run.bat @@ -4,6 +4,8 @@ pushd "%~dp0" set PYTHONWARNINGS=default set PYTHONPYCACHEPREFIX=out\pycache set ANKIDEV=1 +set QTWEBENGINE_REMOTE_DEBUGGING=8080 +set QTWEBENGINE_CHROMIUM_FLAGS=--remote-allow-origins=http://localhost:8080 call tools\ninja pylib qt extract:win_amd64_audio || exit /b 1 .\out\pyenv\scripts\python tools\run.py %* || exit /b 1