mirror of
https://github.com/ankitects/anki.git
synced 2026-07-21 21:26:52 -04:00
## Linked issue Closes #5079 ## Summary / motivation Anki's webviews can be debugged by accessing http://127.0.0.1:8080/ in Chromium-based browsers. In recent Chromium builds, the DevTools inspector page is served from https://chrome-devtools-frontend.appspot.com, which needs to be passed to `--remote-allow-origins` to allow the connection. ## Steps to reproduce (before) - Navigate http://127.0.0.1:8080/ after launching Anki (using one of the run scripts) - Open any listed page there and confirm you see an error: "Debugging connection was closed". ## How to test (after) Repeat the same steps and confirm you can access DevTools with no errors. ## UI evidence <img width="304" height="144" alt="image" src="https://github.com/user-attachments/assets/159cfd9a-6112-4144-b88b-f2bee80b76a3" />
17 lines
455 B
Batchfile
Executable File
17 lines
455 B
Batchfile
Executable File
@echo off
|
|
pushd "%~dp0"
|
|
|
|
set PYTHONWARNINGS=default
|
|
set PYTHONPYCACHEPREFIX=out\pycache
|
|
set ANKIDEV=1
|
|
set QTWEBENGINE_REMOTE_DEBUGGING=8080
|
|
set QTWEBENGINE_CHROMIUM_FLAGS=--remote-allow-origins=https://chrome-devtools-frontend.appspot.com,http://localhost:8080
|
|
set ANKI_API_PORT=40000
|
|
set ANKI_API_HOST=127.0.0.1
|
|
|
|
@if not defined PYENV set PYENV=out\pyenv
|
|
|
|
call tools\ninja pylib qt || exit /b 1
|
|
%PYENV%\Scripts\python tools\run.py %* || exit /b 1
|
|
popd
|