Skip to content

Commit

Permalink
Fix webengine remote debugging in Qt6
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
dae committed Nov 5, 2023
1 parent e071fb4 commit db03142
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db03142

Please sign in to comment.