mirror of
https://github.com/searxng/searxng.git
synced 2024-11-25 12:21:00 +00:00
[fix] debug console (pdb) in a session started by make run
Commit c7f27404
moves the `python -m searx.webapp` process to the background. A
background job can't open a simple python-debugger (pdb) console.
This patch moves all processes to the background except the searx.webapp.
Insert a break point somewhere in the webapp application::
import pdb
pdb.set_trace()
And start a debug session by::
make run
and test you break point.
To test that the entire 'make run' stops in the case of an error in the
themes.live [1] background process try:
make LIVE_THEME=typo-theme-name run
[1] https://github.com/searxng/searxng/pull/664#discussion_r776419585
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
00d3a7477c
commit
c9cfa6181b
1 changed files with 12 additions and 8 deletions
20
manage
20
manage
|
@ -121,14 +121,18 @@ fi
|
||||||
export DOCS_BUILD
|
export DOCS_BUILD
|
||||||
|
|
||||||
webapp.run() {
|
webapp.run() {
|
||||||
SEARXNG_DEBUG=1 pyenv.cmd python -m searx.webapp &
|
local parent_proc="$$"
|
||||||
sleep 3
|
(
|
||||||
if [ "${LIVE_THEME}" ]; then
|
if [ "${LIVE_THEME}" ]; then
|
||||||
themes.live "${LIVE_THEME}" &
|
( themes.live "${LIVE_THEME}" )
|
||||||
fi
|
kill $parent_proc
|
||||||
xdg-open http://127.0.0.1:8888/
|
fi
|
||||||
wait -n
|
)&
|
||||||
kill 0
|
(
|
||||||
|
sleep 3
|
||||||
|
xdg-open http://127.0.0.1:8888/
|
||||||
|
)&
|
||||||
|
SEARXNG_DEBUG=1 pyenv.cmd python -m searx.webapp
|
||||||
}
|
}
|
||||||
|
|
||||||
buildenv() {
|
buildenv() {
|
||||||
|
|
Loading…
Reference in a new issue