Ejemplo n.º 1
0
# following).
preimport('pydevd', [
    '_pydev_bundle',
    '_pydev_imps',
    '_pydev_runfiles',
    '_pydevd_bundle',
    '_pydevd_frame_eval',
    'pydev_ipython',
    'pydevd_concurrency_analyser',
    'pydevd_plugins',
    'pydevd',
])

# When pydevd is imported it sets the breakpoint behavior, but it needs to be
# overridden because by default pydevd will connect to the remote debugger using
# its own custom protocol rather than DAP.
import pydevd  # noqa
import debugpy  # noqa


def debugpy_breakpointhook():
    debugpy.breakpoint()


pydevd.install_breakpointhook(debugpy_breakpointhook)

# Ensure that pydevd uses JSON protocol
from _pydevd_bundle import pydevd_constants
from _pydevd_bundle import pydevd_defaults
pydevd_defaults.PydevdCustomization.DEFAULT_PROTOCOL = pydevd_constants.HTTP_JSON_PROTOCOL
Ejemplo n.º 2
0
    '_pydev_bundle',
    '_pydev_imps',
    '_pydev_runfiles',
    '_pydevd_bundle',
    '_pydevd_frame_eval',
    'pydev_ipython',
    'pydevd_concurrency_analyser',
    'pydevd_plugins',
    'pydevd',
])

# When pydevd is imported it sets the breakpoint behavior, but it needs to be
# overridden because the pydevd version will connect to the remote debugger by
# default, but without using the ptvsd protocol (so, we need to use the ptvsd
# API to handle things as expected by the debug adapter).
import pydevd  # noqa
import ptvsd  # noqa


def ptvsd_breakpointhook():
    ptvsd.break_into_debugger()


pydevd.install_breakpointhook(ptvsd_breakpointhook)

# Ensure that pydevd uses JSON protocol
from _pydevd_bundle.pydevd_constants import JSON_PROTOCOL
from _pydevd_bundle.pydevd_defaults import PydevdCustomization

PydevdCustomization.DEFAULT_PROTOCOL = JSON_PROTOCOL
Ejemplo n.º 3
0
# Now make sure all the top-level modules and packages in pydevd are
# loaded.  Any pydevd modules that aren't loaded at this point, will
# be loaded using their parent package's __path__ (i.e. one of the
# following).
preimport('pydevd', [
    '_pydev_bundle',
    '_pydev_imps',
    '_pydev_runfiles',
    '_pydevd_bundle',
    '_pydevd_frame_eval',
    'pydev_ipython',
    'pydevd_concurrency_analyser',
    'pydevd_plugins',
    'pydevd',
])

# When pydevd is imported it sets the breakpoint behavior, but it needs to be
# overridden because the pydevd version will connect to the remote debugger by
# default, but without using the ptvsd protocol (so, we need to use the ptvsd
# API to handle things as expected by the debug adapter).
import pydevd  # noqa
import ptvsd  # noqa


def ptvsd_breakpointhook():
    ptvsd.break_into_debugger()


pydevd.install_breakpointhook(ptvsd_breakpointhook)