Unable to debug .exe generated by pyinstaller.
Am I missing something on bootstrap?
-- File (main.py)
async def Setup(self) -> None:
debugpy.listen(('0.0.0.0', 5678)) # Line: 42 <---------------------
print("Waiting for debugger attach...")
debugpy.wait_for_client()
print("Debugger attached!")
-- File (installer.py)
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
"""
Provide assistance with debugging a frozen application.
Tells the bootloader to issue progress messages while initializing and starting the bundled app.
"""
Debug = "all" # Default = None | Options: all | imports | bootloader | noarchive
--------- snip --------
if Debug != None and Debug != "":
for d in collect_data_files('debugpy'):
self._data.update({d})
self._hiddenImports += collect_submodules('xmlrpc')
self._hiddenImports += collect_submodules('debugpy')
pyinstaller <...args...> --add-data="{1}" <...> --hidden-import="{1]}" <...> <target.py>
If I remove the 'debugpy' code, things run fine.
What's missing?
PyiFrozenFinder(~\dist\Test\_internal\debugpy\_vendored\pydevd\_pydevd_bundle): find_spec: called with fullname='_pydevd_bundle.pydevd_constants', target='_pydevd_bundle.pydevd_constants'
PyiFrozenFinder(~\src\dist\Test\_internal\debugpy\_vendored\pydevd\_pydevd_bundle): find_spec: '_pydevd_bundle.pydevd_constants' not found in PYZ...
PyiFrozenFinder(~\dist\Test\_internal\debugpy\_vendored\pydevd\_pydevd_bundle): find_spec: attempting resolve using fallback finder FileFinder('~\\dist\\Test\\_internal\\debugpy\\_vendored\\pydevd\\_pydevd_bundle').
PyiFrozenFinder(~\dist\Test\_internal\debugpy\_vendored\pydevd\_pydevd_bundle): find_spec: fallback finder returned spec: None.
No module named '_pydevd_bundle.pydevd_constants'
# destroy debugpy._vendored.force_pydevd
# destroy debugpy.server

Unable to debug .exe generated by pyinstaller.
Am I missing something on bootstrap?
-- File (main.py)
-- File (installer.py)
If I remove the 'debugpy' code, things run fine.
What's missing?