Python 的 Codenvy 调试环境
Codenvy Debugging Environments for Python
我正在尝试使用 Codenvy 进行 Python 开发。不过他们好像没有嵌入式调试方案。
所以我去了他们的帮助论坛,和我一样的人请求调试器功能。
这是他们的回复:
Codenvy allows you to set up any debugging environment for any
language you need, exactly as you need it through a Dockerfile. Our
docs
[http://docs.codenvy.com/user/creating-custom-builder-runner-environments/#custom-overview]
outline how to set this up.
If your current IDE provides sufficient debugging capabilities you can
now use it with Codenvy via our CLI. Documentation on our CLI is here:
[http://docs.codenvy.com/cli/]
但是,我不确定他们通过 docker 文件设置它是什么意思。我确实找到了一些提示
# Codenvy uses this port to map IDE clients to the debugger
# of your application within the Runner. Set these
# values to the port of your debugger and Codenvy will
# map this port to the debugger console in the browser.
# You can set this value multiple times.
# For example:
# ENV CODENVY_APP_PORT_8000_DEBUG 8000
#
# ENV CODENVY_APP_PORT_<port>_DEBUG <port>
# Set this value to the port of any terminals operating
# within your runner. If you inherit a base image from
# codenvy/shellinabox (or any of our images that inherit
# from it, you do not need to set this value. We already
# set it for you.
# ENV CODENVY_WEB_SHELL_PORT <port>
这是否意味着我需要使用外部 IDE 并在 docker 容器中打开端口进行调试?有人可以指导我吗?
我不是专家,但我怀疑您的部分答案可能会在这里找到 http://blog.codenvy.com/cooking-custom-build-environments/ otherwise you could email the author of http://thecli.blogspot.it/2014/12/diving-into-codenvy.html
您可能想尝试远程调试,即 运行Codenvy 中的脚本并使用本地 IDE 调试器连接。 PyCharm 有一些关于如何操作的很好的教程。只需确保使用正确的端口,即映射端口。
Codenvy 没有针对 Python 的内置调试器,但是,您可以使用 pdb。
将其导入到您的 Python 脚本中,然后不设置断点,只需插入:
pdb.set_trace()
我正在尝试使用 Codenvy 进行 Python 开发。不过他们好像没有嵌入式调试方案。
所以我去了他们的帮助论坛,和我一样的人请求调试器功能。
这是他们的回复:
Codenvy allows you to set up any debugging environment for any language you need, exactly as you need it through a Dockerfile. Our docs [http://docs.codenvy.com/user/creating-custom-builder-runner-environments/#custom-overview] outline how to set this up.
If your current IDE provides sufficient debugging capabilities you can now use it with Codenvy via our CLI. Documentation on our CLI is here: [http://docs.codenvy.com/cli/]
但是,我不确定他们通过 docker 文件设置它是什么意思。我确实找到了一些提示
# Codenvy uses this port to map IDE clients to the debugger
# of your application within the Runner. Set these
# values to the port of your debugger and Codenvy will
# map this port to the debugger console in the browser.
# You can set this value multiple times.
# For example:
# ENV CODENVY_APP_PORT_8000_DEBUG 8000
#
# ENV CODENVY_APP_PORT_<port>_DEBUG <port>
# Set this value to the port of any terminals operating
# within your runner. If you inherit a base image from
# codenvy/shellinabox (or any of our images that inherit
# from it, you do not need to set this value. We already
# set it for you.
# ENV CODENVY_WEB_SHELL_PORT <port>
这是否意味着我需要使用外部 IDE 并在 docker 容器中打开端口进行调试?有人可以指导我吗?
我不是专家,但我怀疑您的部分答案可能会在这里找到 http://blog.codenvy.com/cooking-custom-build-environments/ otherwise you could email the author of http://thecli.blogspot.it/2014/12/diving-into-codenvy.html
您可能想尝试远程调试,即 运行Codenvy 中的脚本并使用本地 IDE 调试器连接。 PyCharm 有一些关于如何操作的很好的教程。只需确保使用正确的端口,即映射端口。
Codenvy 没有针对 Python 的内置调试器,但是,您可以使用 pdb。
将其导入到您的 Python 脚本中,然后不设置断点,只需插入:
pdb.set_trace()