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

Add support for pydevd --continue to allow launching an app without pausing #199

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

briandealwis
Copy link

This PR adds a new flag to pydevd, --continue, to start the application without waiting for the debugger connection. @etanshaul has been testing this with PyCharm with good results.

I didn't find an obvious place to create a test around this and would appreciate a pointer for how to proceed.

Fixes #161

@fabioz
Copy link
Owner

fabioz commented May 20, 2021

Hi Brian, can you elaborate a bit on when you'd use this?

i.e.: In general this wouldn't be a good idea as it'd add the possibility of missing breakpoints until those are actually sent from the client, so, I'm curious on the use case here...

@briandealwis
Copy link
Author

Sorry Fabio, this got lost in my inbox.

At its essence, we're interested in supporting debugging of Python micro-services as part of a Kubernetes-based application. The scenario is usually around a developer launching the app in a development environment, such that they control how inputs are fed into the system; it's not for live-debugging of a production or staging environment. So the developer is usually in control over initiating requests of the application, so the risk of missing breakpoint scenarios is small.

Kubernetes has various readiness and liveness requirements for services, so a container that is paused waiting for a debugger to connect and resume execution can trigger a ripple effect across the system.

@briandealwis
Copy link
Author

Hi @fabioz — is it possible to get this committed?

@fabioz
Copy link
Owner

fabioz commented Aug 27, 2021

Sorry for the delay... this got lost on my side too :(

Would it be ok for you to rename the argument from --continue to --no-wait?

-- I think --no-wait signals that it's not waiting for breakpoints to be sent by the client before proceeding the execution a bit better than --continue.

Also, can you create one test-case for this (to make sure that it won't break going further)? -- the related test should be in test_debugger.py -- you may need a custom fixture to customize the arguments (i.e.: tests_python.debugger_fixtures).

@fabioz
Copy link
Owner

fabioz commented Aug 27, 2021

p.s.: if you need more pointers on the test case, please let me know.

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

Successfully merging this pull request may close these issues.

Question: How can I run a script with pydevd in --server mode
2 participants