Allow "request": "attach"
and "autoReload":
to auto-reload code in remote service
#1875
Replies: 3 comments 4 replies
-
Reload is tricky, you can read more about it here (debugpy basically does the same thing as xreload): What you're asking for is reload on attach, which I'm not sure why it isn't supported. Seems like it could be. Essentially there's a thread in the debugger that's just sitting there waiting for file change notifications. It then attempts to reload the affected module. Not sure why that wouldn't work during attach. The putting everything back on detach would be iffy though. Reload doesn't always work. What if you made a change and it couldn't be put back? |
Beta Was this translation helpful? Give feedback.
-
Transferring to a discussion item |
Beta Was this translation helpful? Give feedback.
-
If that's not feasible that's fine, just means we [my org] have to enforce that workflow. If you believe it does/could/should work and can make a minimal example, it could just be that the schema for VSCode's debugpy launch config is incorrect and our [my org's] containerised service build will need to be amended- I've tried making some exploratory changes without success but if I knew it was possible I could dedicate more time. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to use debugpy to diagnose issues and try potential solutions in a running service.
autoReload
appears to be mutually exclusive with"request": "attach"
, only allowed if"request": "launch"
.Is this a hard limitation that will never be possible?
Some of the services to be debugged are serving control systems for hardware on specific Kubernetes nodes, so using something like Telepresence to proxy traffic to a local instance of the service is not practical.
Ideally, launching with "request": "attach" and
autoReload
would connect to the service, allow live code changes and on disconnect return the code to its initial state. Any code changes are preserved on the developer machine and can be re-deployed, leaving the running service in an unknown state for the minimum amount of time.Snapshot of Intellisense telling me that
autoReload
is not allowed.Beta Was this translation helpful? Give feedback.
All reactions