-
Notifications
You must be signed in to change notification settings - Fork 117
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
Make it easier to debug functions in IDEs #29
Comments
Thanks for the report! I'm not that familiar with PyCharm so bear with me: is it not possible to use a command like I think it would be reasonable to add a |
PyCharm has its own debugger that is injected as a sidecar to the module being run with lots of cool functions. The |
Hi @yuri-sergiichuk, can you try this branch and let me know if it works for you? You should be able to install it with:
|
Hi @di. Yes, I can run it as a module now and for PyCharm that it enough. Also, maybe it still worth having the Also, I use pipenv install -e git+https://github.com/googlecloudplatform/functions-framework-python.git@add-main#egg=functions-framework |
Great!
This particular file is not meant to be run directly. I renamed it |
Released in |
@yuri-sergiichuk can you share what you did in Pycharm to make it run in debug i.e. stop at breakpoints ? |
Update: removing |
Currently, it is super hard to configure the local debug of the functions in PyCharm, moreover, I found it impossible without hacking the
cli.py
.Here is a way to do it in PyCharm now:
cli.py
:functions_framework\cli.py
as a script.Parameters
in the configuration, e.g.--port 8088 --signature-type http
, etc.What we can to make life easier:
__main__.py
in the functions_framework module and allow running the module as the CLI. Or, add the main function to thecli.py
itself, maybe worth having both.The text was updated successfully, but these errors were encountered: