You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python -Xfrozen_modules=off -m debugpy --wait-for-client --listen 5675 ../poky/bitbake/bin/bitbake busybox
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Expected behavior
skip frozen_module and not exit the debugger
Steps to reproduce:
clone poky
source poky/oe-init-build-env
python -Xfrozen_modules=off -m debugpy --wait-for-client --listen 5675 ../poky/bitbake/bin/bitbake busybox
run debugger in vscode
IT exited because it hit an "os.execl" syscall inside a daemon function. Not a debugpy issue I suppose.
Is it possible to debug daemons run with os.execl?
I have added the following to the daemon script, it is not breaking nor binding to the vscode client :
import debugpy
# Listen on a port for VSCode to attach
debugpy.listen(("0.0.0.0", 5678))
debugpy.wait_for_client()
After investigating, I figured out that for some reason the process running os.execl disconnects from the debugger, and adding debugpy.listen iniside the script and connecting throws something like "process with pid is already being debugged".
DOes debugpy support debugging of deamon started with os.execl ?
yes os.execl start the runtime with the same pid.
subprocesses that run os.execl cannot be debugged along with parent processes, either parents or children that exec os.execl, not both at the same time.
Activity
rchiodo commentedon Aug 29, 2025
I don't think that's causing the app to exit. It's just a warning. What actually happens when you run the python command?
ssooffiiaannee commentedon Aug 30, 2025
IT exited because it hit an "os.execl" syscall inside a daemon function. Not a debugpy issue I suppose.
Is it possible to debug daemons run with os.execl?
I have added the following to the daemon script, it is not breaking nor binding to the vscode client :
ssooffiiaannee commentedon Aug 30, 2025
After investigating, I figured out that for some reason the process running
os.execldisconnects from the debugger, and addingdebugpy.listeniniside the script and connecting throws something like "process with pid is already being debugged".DOes debugpy support debugging of deamon started with os.execl ?
rchiodo commentedon Sep 2, 2025
I don't think this use case is supported. AFAICT,
os.execlrestarts the python runtime with the same pid?So debugpy shuts down (when the python runtime stops) but then the client still thinks it's debugging the same process.
ssooffiiaannee commentedon Sep 6, 2025
yes os.execl start the runtime with the same pid.
subprocesses that run os.execl cannot be debugged along with parent processes, either parents or children that exec os.execl, not both at the same time.