GoogleCloudPlatform / GoogleCloudPlatform/cloud-code-intellij

Hot reload on debug mode without flask

Open
#3,042 1 comment 0 reactions 1 assignee Claimed by @etanshaul View on GitHub
Dominant language
No language data
Stars
325
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Not sure if skaffold issue or CloudRun - will repost to skaffold if needed

### Additional Information

Hi,
My application isn't using flask, so I'm relying on [hupper](https://github.com/Pylons/hupper) to preform hot-reload on file changes.
The entry point becomes `hupper -m mypackage.mymodule` instead of `python -m mypackage.mymodule` (or `python /path/to/mypackage/mymodule.py`

This works nicely on "Run", but when working with "Debug" the entry point changes to

```yaml
- command:
- /dbg/python/launcher
- --mode
- pydevd
- --port
- "5678"
- --
- hupper
args:
- -m
- mypackage.mymodule
```
which runs, but doesn't stop on breakpoint (the debugger tab isn't even opened and there's no `Connected to pydev debugger (build 213.5744.248)`

If I use python directly (without hupper) then it works as expected (stops on breakpoints and opens the debug tab) but there's no hot-reload, so I need to rebuild and redeploy on every change to the files.

What is the recommend way to enable hot reload without flask?

- IDE type (e.g. IntelliJ, Pycharm): Pycharm
- IDE version: `Build #PY-213.5744.248, built on November 30, 2021`
- Cloud Code version (Settings > Plugins > Cloud Code): `21.12.1-213`
- Cloud SDK (Settings > Cloud Code > Cloud SDK)
- Are you allowing the plugin to manage the Cloud SDK: Yes
- Version of the Cloud SDK: `366.0.0`
- Skaffold version (If you are using Kubernetes features; Settings > Cloud Code > Kubernetes): `1.34.0`
- Operating System: `MacOs BigSur 11.6.1`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.