Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug mode is not activated #4

Closed
flachica opened this issue Aug 26, 2023 · 4 comments
Closed

Debug mode is not activated #4

flachica opened this issue Aug 26, 2023 · 4 comments

Comments

@flachica
Copy link

Environment:

Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

Context:

I follow readme executing:

./setup.sh
docker-compose build
docker-compose run --rm odoo odoo init
docker-compose run --rm odoo odoo update # To see how be executed
docker-compose up

In this way I have an Odoo instance running with no issue

I execute docker-compose down -v and create my .vscode following this guide

Problem

Try to run with F5 from vscode but no debugger session is started.

Checks

If execute command of tasks.json Odoo is started with no issue too.
I double check if have debugpy installed and ports opened

tcp        0      0 127.0.0.1:8072          0.0.0.0:*               ESCUCHAR    164276/docker-proxy 
tcp        0      0 127.0.0.1:8069          0.0.0.0:*               ESCUCHAR    164289/docker-proxy 
tcp        0      0 127.0.0.1:6543          0.0.0.0:*               ESCUCHAR    164170/docker-proxy 
tcp        0      0 127.0.0.1:5678          0.0.0.0:*               ESCUCHAR    164302/docker-proxy 
@fkantelberg
Copy link
Member

It seems like that the additional dev.yaml file is loaded in your case but not the environment variable BOOTSTRAP_DEBUGGER. I don't think that you'll see the line Starting with debugger in the log output. Can You try to add the following line to your .env file BOOTSTRAP_DEBUGGER=debugpy and see if there is a change?

Otherwise which doblib and debugpy version is installed inside of the container? (docker-compose run --rm odoo pip list)

@flachica
Copy link
Author

I attached shell to dob container and run echo $BOOTSTRAP_DEBUGGER and return debugpy

I see this log:

2023-08-28 10:38:25 INFO doblib.utils: Loading configuration file
2023-08-28 10:38:25 INFO doblib.utils:  * odoo.local.yaml
2023-08-28 10:38:25 INFO doblib.utils:  * odoo.project.yaml
2023-08-28 10:38:25 INFO doblib.utils:  * odoo.default.yaml
2023-08-28 10:38:25 INFO doblib.utils:  * odoo.yaml
2023-08-28 10:38:25 INFO doblib.utils:  * defuse.yaml
2023-08-28 10:38:25 INFO doblib.utils:  * anonymize.yaml
2023-08-28 10:38:25 WARNING doblib.utils:  * odoo.versions.yaml
2023-08-28 10:38:25 INFO doblib.utils: Linking Odoo modules
2023-08-28 10:38:25 INFO doblib.utils: Starting with debugger debugpy

And this is the result of docker-compose run --rm odoo pip list

Package             Version
------------------- ------------
argcomplete         3.1.1
astroid             2.13.5
asttokens           2.2.1
attrs               23.1.0
Babel               2.12.1
backcall            0.2.0
beautifulsoup4      4.12.2
black               23.7.0
certifi             2023.7.22
cffi                1.15.1
chardet             5.2.0
charset-normalizer  3.2.0
click               8.1.7
colorama            0.4.6
coverage            7.3.0
cryptography        41.0.3
debugpy             1.6.7.post1
decorator           5.1.1
dill                0.3.7
doblib              0.17.0
docopt              0.6.2
docutils            0.20.1
exceptiongroup      1.1.3
executing           1.2.0
feedparser          6.0.10
flake8              6.1.0
freetype-py         2.3.0
freezegun           1.2.2
gevent              23.7.0
git-aggregator      4.0
greenlet            2.0.2
html2text           2020.1.16
idna                3.4
iniconfig           2.0.0
ipython             8.12.2
isodate             0.6.1
isort               5.12.0
jedi                0.19.0
Jinja2              3.1.2
lazy-object-proxy   1.9.0
libsass             0.22.0
lxml                4.9.3
Mako                1.2.4
MarkupSafe          2.1.3
matplotlib-inline   0.1.6
mccabe              0.7.0
mock                5.1.0
mypy-extensions     1.0.0
num2words           0.5.12
ofxparse            0.21
packaging           23.1
parso               0.8.3
passlib             1.7.4
pathspec            0.11.2
pexpect             4.8.0
pickleshare         0.7.5
Pillow              10.0.0
pip                 23.0.1
platformdirs        3.10.0
pluggy              1.3.0
polib               1.2.0
prompt-toolkit      3.0.39
psutil              5.9.5
psycopg2            2.9.7
ptyprocess          0.7.0
pure-eval           0.2.2
pyasn1              0.5.0
pyasn1-modules      0.3.0
pycairo             1.24.0
pycodestyle         2.11.0
pycparser           2.21
pydot               1.4.2
pyflakes            3.1.0
Pygments            2.16.1
pyldap              3.0.0.post1
pylint              2.15.10
pylint-odoo         8.0.20
pylint-plugin-utils 0.7
pyOpenSSL           23.2.0
pyparsing           3.1.1
PyPDF2              1.28.4
pypng               0.20220715.0
pyserial            3.5
pytest              7.4.0
pytest-cov          4.1.0
pytest-odoo         1.0.0
python-dateutil     2.8.2
python-ldap         3.4.3
python-stdnum       1.19
pytz                2023.3
pyusb               1.2.1
PyYAML              6.0.1
qrcode              7.4.2
reportlab           4.0.4
requests            2.31.0
requests-file       1.5.1
requests-toolbelt   1.0.0
rlPyCairo           0.3.0
setuptools          57.5.0
sgmllib3k           1.0.0
six                 1.16.0
soupsieve           2.4.1
stack-data          0.6.2
suds-jurko          0.6
tomli               2.0.1
tomlkit             0.12.1
traitlets           5.9.0
typing_extensions   4.7.1
urllib3             2.0.4
validators          0.20.0
vatnumber           1.2
vobject             0.9.6.1
wcwidth             0.2.6
Werkzeug            0.16.1
wheel               0.41.2
wrapt               1.15.0
xlrd                2.0.1
XlsxWriter          3.1.2
xlwt                1.3.0
zeep                4.2.1
zope.event          5.0
zope.interface      6.0

@fkantelberg
Copy link
Member

I suspect a timing issue. If I create a similar setup and press F5 once it hangs because vscode isn't attaching. If I press F5 again it attaches to the container and runs. I guess that vscode is currently not waiting before attaching to the port.

@flachica
Copy link
Author

Indeed, dear @fkantelberg. If I run F5 twice, the first time to bring up the service and the second time to try again to connect to the debug port, I was able to put VSCode in debug mode.

Thanks for your time and for building this awesome tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants