-
Notifications
You must be signed in to change notification settings - Fork 67
Add json-dap command line and debug options #1461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing this review got me thinking a bit about how we want to approach having pydevd
out of process...
I think we'll want to keep the ptvsd
namespace for users (for the current public API), so, a part of ptvsd
will still be builtin into the same process pydevd
and could use pydevd
in the namespace and that could be a good place to customize what we need without needing to add arguments nor environment variables.
So, maybe a better approach could be:
Create a pydevd_defaults.py
module which would be the place for flags we want to customize (right next to pydevd_constants.py
) with:
from _pydevd_bundle.pydevd_constants import QUOTED_LINE_PROTOCOL
class PydevdCustomization(object):
DEFAULT_PROTOCOL = QUOTED_LINE_PROTOCOL
and in the PyDB
constructor, instead of checking the environment variable, just do:
PyDevdAPI().set_protocol(self, PydevdCustomization.DEFAULT_PROTOCOL)
and in force_pydevd.py
PydevdCustomization.DEFAULT_PROTOCOL = JSON_PROTOCOL
In that case we wouldn't need the handling of the arguments nor the environment variable... what do you think?
@fabioz I like the idea using |
The 2.7 failure on windows seems to be the result of tox 3.12.0 that was released today. Likely there will be a patch.
|
Fixes #1460