We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
New debugger displays warnings about `speeds using cython not found`
@DonJayamanne commented on [Mon Jan 28 2019](https://github.com/Microsoft/vscode-python/issues/4190)

Old version of PTVSD didn't display this warning, new version of PTVDS does.

Here's the old version:
<img width="924" alt="screen shot 2019-01-28 at 4 46 12 pm" src="https://user-images.githubusercontent.com/1948812/51876152-732e9580-231c-11e9-950c-2daf36348496.png">

Here's the output from the new version:
<img width="924" alt="screen shot 2019-01-28 at 4 46 54 pm" src="https://user-images.githubusercontent.com/1948812/51876162-7aee3a00-231c-11e9-926e-edc7c3a7991d.png">


I consider this a P1 as we're displaying warnings that we didn't (removed) in previous versions. This will end up confusing users.



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py`
Content:
```
1 import os
2 import sys
3 
4 from _pydevd_bundle.pydevd_constants import IS_PYCHARM
5 
6 IS_PY36_OR_GREATER = sys.version_info >= (3, 6)
7 
8 frame_eval_func = None
9 stop_frame_eval = None
10 dummy_trace_dispatch = None
11 show_frame_eval_warning = False
12 clear_thread_local_info = None
13 
14 # "NO" means we should not use frame evaluation, 'YES' we should use it (and fail if not there) and unspecified uses if possible.
15 use_frame_eval = os.environ.get('PYDEVD_USE_FRAME_EVAL', None)
16 
17 if use_frame_eval == 'NO':
18     pass
19 
20 elif use_frame_eval == 'YES':
21     # Fail if unable to use
22     from _pydevd_frame_eval.pydevd_frame_eval_cython_wrapper import frame_eval_func, stop_frame_eval, dummy_trace_dispatch, clear_thread_local_info
23 
24 elif use_frame_eval is None:
25     # Try to use if possible
26     if IS_PY36_OR_GREATER:
27         try:
28             from _pydevd_frame_eval.pydevd_frame_eval_cython_wrapper import frame_eval_func, stop_frame_eval, dummy_trace_dispatch, clear_thread_local_info
29         except ImportError:
30             from _pydev_bundle.pydev_monkey import log_error_once
31 
32             dirname = os.path.dirname(os.path.dirname(__file__))
33             if not IS_PYCHARM:
34                 log_error_once("warning: Debugger speedups using cython not found. Run '\"%s\" \"%s\" build_ext --inplace' to build." % (
35                     sys.executable, os.path.join(dirname, 'setup_cython.py')))
36             else:
37                 show_frame_eval_warning = True
38 
39 else:
40     raise RuntimeError('Unexpected value for PYDEVD_USE_FRAME_EVAL: %s (accepted: YES, NO)' % (use_frame_eval,))
41
```

Path: `src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py`
Content:
```
1 # Defines which version of the trace_dispatch we'll use.
2 # Should give warning only here if cython is not available but supported.
3 
4 import os
5 import sys
6 from _pydevd_bundle.pydevd_constants import CYTHON_SUPPORTED
7 
8 
9 use_cython = os.getenv('PYDEVD_USE_CYTHON', None)
10 dirname = os.path.dirname(os.path.dirname(__file__))
11 # Do not show incorrect warning for .egg files for Remote debugger
12 if not CYTHON_SUPPORTED or dirname.endswith('.egg'):
13     # Do not try to import cython extensions if cython isn't supported
14     use_cython = 'NO'
15 
16 
17 def delete_old_compiled_extensions():
18     import _pydevd_bundle_ext
19     cython_extensions_dir = os.path.dirname(os.path.dirname(_pydevd_bundle_ext.__file__))
20     _pydevd_bundle_ext_dir = os.path.dirname(_pydevd_bundle_ext.__file__)
21     _pydevd_frame_eval_ext_dir = os.path.join(cython_extensions_dir, '_pydevd_frame_eval_ext')
22     try:
23         import shutil
24         for file in os.listdir(_pydevd_bundle_ext_dir):
25             if file.startswith("pydevd") and file.endswith(".so"):
26                 os.remove(os.path.join(_pydevd_bundle_ext_dir, file))
27         for file in os.listdir(_pydevd_frame_eval_ext_dir):
28             if file.startswith("pydevd") and file.endswith(".so"):
29                 os.remove(os.path.join(_pydevd_frame_eval_ext_dir, file))
30         build_dir = os.path.join(cython_extensions_dir, "build")
31         if os.path.exists(build_dir):
32             shutil.rmtree(os.path.join(cython_extensions_dir, "build"))
33     except OSError:
34         from _pydev_bundle.pydev_monkey import log_error_once
35         log_error_once("warning: failed to delete old cython speedups. Please delete all *.so files from the directories "
36                        "\"%s\" and \"%s\"" % (_pydevd_bundle_ext_dir, _pydevd_frame_eval_ext_dir))
37 
38 
39 if use_cython == 'YES':
40     # We must import the cython version if forcing cython
41     from _pydevd_bundle.pydevd_cython_wrapper import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func
42 
43 elif use_cython == 'NO':
44     # Use the regular version if not forcing cython
45     from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func  # @UnusedImport
46 
47 elif use_cython is None:
48     # Regular: use fallback if not found and give message to user
49     try:
50         from _pydevd_bundle.pydevd_cython_wrapper import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func
51 
52         # This version number is always available
53         from _pydevd_bundle.pydevd_additional_thread_info_regular import version as regular_version
54         # This version number from the already compiled cython extension
55         from _pydevd_bundle.pydevd_cython_wrapper import version as cython_version
56         if cython_version != regular_version:
57             delete_old_compiled_extensions()
58             raise ImportError()
59 
60     except ImportError:
61         from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func  # @UnusedImport
62         from _pydev_bundle.pydev_monkey import log_error_once
63 
64         log_error_once("warning: Debugger speedups using cython not found. Run '\"%s\" \"%s\" build_ext --inplace' to build." % (
65             sys.executable, os.path.join(dirname, 'setup_cython.py')))
66 
67 else:
68     raise RuntimeError('Unexpected value for PYDEVD_USE_CYTHON: %s (accepted: YES, NO)' % (use_cython,))
69 
70 
71
```

Path: `src/ptvsd/_vendored/force_pydevd.py`
Content:
```
1 from importlib import import_module
2 import warnings
3 
4 from . import check_modules, prefix_matcher, preimport, vendored
5 
6 
7 # Ensure that pydevd is our vendored copy.
8 _unvendored, _ = check_modules('pydevd',
9                                prefix_matcher('pydev', '_pydev'))
10 if _unvendored:
11     _unvendored = sorted(_unvendored.values())
12     msg = 'incompatible copy of pydevd already imported'
13     #raise ImportError(msg)
14     warnings.warn(msg + ':\n {}'.format('\n  '.join(_unvendored)))
15 
16 
17 # Constants must be set before importing any other pydevd module
18 # # due to heavy use of "from" in them.
19 with vendored('pydevd'):
20     pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')
21 # Disable this, since we aren't packaging the Cython modules at the moment.
22 pydevd_constants.CYTHON_SUPPORTED = False
23 # We limit representation size in our representation provider when needed.
24 pydevd_constants.MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 2**32
25 
26 
27 # Now make sure all the top-level modules and packages in pydevd are
28 # loaded.  Any pydevd modules that aren't loaded at this point, will
29 # be loaded using their parent package's __path__ (i.e. one of the
30 # following).
31 preimport('pydevd', [
32     '_pydev_bundle',
33     '_pydev_imps',
34     '_pydev_runfiles',
35     '_pydevd_bundle',
36     '_pydevd_frame_eval',
37     'pydev_ipython',
38     'pydevd_concurrency_analyser',
39     'pydevd_plugins',
40     'pydevd',
41 ])
42 
43 # When pydevd is imported it sets the breakpoint behavior, but it needs to be
44 # overridden because the pydevd version will connect to the remote debugger by
45 # default, but without using the ptvsd protocol (so, we need to use the ptvsd
46 # API to handle things as expected by the debug adapter).
47 import pydevd  # noqa
48 import ptvsd  # noqa
49 
50 
51 def ptvsd_breakpointhook():
52     ptvsd.break_into_debugger()
53 
54 
55 pydevd.install_breakpointhook(ptvsd_breakpointhook)
56
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/ptvsd/_vendored/force_pydevd.py b/src/ptvsd/_vendored/force_pydevd.py
--- a/src/ptvsd/_vendored/force_pydevd.py
+++ b/src/ptvsd/_vendored/force_pydevd.py
@@ -18,7 +18,7 @@
 # # due to heavy use of "from" in them.
 with vendored('pydevd'):
     pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')
-# Disable this, since we aren't packaging the Cython modules at the moment.
+# TODO: figure out what the appropriate setting is to work for both wheels and sdist.
 pydevd_constants.CYTHON_SUPPORTED = False
 # We limit representation size in our representation provider when needed.
 pydevd_constants.MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 2**32
diff --git a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py
--- a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py
+++ b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py
@@ -59,10 +59,11 @@
 
     except ImportError:
         from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func  # @UnusedImport
-        from _pydev_bundle.pydev_monkey import log_error_once
+        #from _pydev_bundle.pydev_monkey import log_error_once
 
-        log_error_once("warning: Debugger speedups using cython not found. Run '\"%s\" \"%s\" build_ext --inplace' to build." % (
-            sys.executable, os.path.join(dirname, 'setup_cython.py')))
+        #log_error_once("warning: Debugger speedups using cython not found. Run '\"%s\" \"%s\" build_ext --inplace' to build." % (
+        #    sys.executable, os.path.join(dirname, 'setup_cython.py')))
+        pass
 
 else:
     raise RuntimeError('Unexpected value for PYDEVD_USE_CYTHON: %s (accepted: YES, NO)' % (use_cython,))
diff --git a/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py b/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py
--- a/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py
+++ b/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py
@@ -31,8 +31,9 @@
 
             dirname = os.path.dirname(os.path.dirname(__file__))
             if not IS_PYCHARM:
-                log_error_once("warning: Debugger speedups using cython not found. Run '\"%s\" \"%s\" build_ext --inplace' to build." % (
-                    sys.executable, os.path.join(dirname, 'setup_cython.py')))
+                #log_error_once("warning: Debugger speedups using cython not found. Run '\"%s\" \"%s\" build_ext --inplace' to build." % (
+                #    sys.executable, os.path.join(dirname, 'setup_cython.py')))
+                pass
             else:
                 show_frame_eval_warning = True

{"golden_diff": "diff --git a/src/ptvsd/_vendored/force_pydevd.py b/src/ptvsd/_vendored/force_pydevd.py\n--- a/src/ptvsd/_vendored/force_pydevd.py\n+++ b/src/ptvsd/_vendored/force_pydevd.py\n@@ -18,7 +18,7 @@\n # # due to heavy use of \"from\" in them.\n with vendored('pydevd'):\n     pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')\n-# Disable this, since we aren't packaging the Cython modules at the moment.\n+# TODO: figure out what the appropriate setting is to work for both wheels and sdist.\n pydevd_constants.CYTHON_SUPPORTED = False\n # We limit representation size in our representation provider when needed.\n pydevd_constants.MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 2**32\ndiff --git a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py\n--- a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py\n+++ b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py\n@@ -59,10 +59,11 @@\n \n     except ImportError:\n         from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func  # @UnusedImport\n-        from _pydev_bundle.pydev_monkey import log_error_once\n+        #from _pydev_bundle.pydev_monkey import log_error_once\n \n-        log_error_once(\"warning: Debugger speedups using cython not found. Run '\\\"%s\\\" \\\"%s\\\" build_ext --inplace' to build.\" % (\n-            sys.executable, os.path.join(dirname, 'setup_cython.py')))\n+        #log_error_once(\"warning: Debugger speedups using cython not found. Run '\\\"%s\\\" \\\"%s\\\" build_ext --inplace' to build.\" % (\n+        #    sys.executable, os.path.join(dirname, 'setup_cython.py')))\n+        pass\n \n else:\n     raise RuntimeError('Unexpected value for PYDEVD_USE_CYTHON: %s (accepted: YES, NO)' % (use_cython,))\ndiff --git a/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py b/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py\n--- a/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py\n+++ b/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py\n@@ -31,8 +31,9 @@\n \n             dirname = os.path.dirname(os.path.dirname(__file__))\n             if not IS_PYCHARM:\n-                log_error_once(\"warning: Debugger speedups using cython not found. Run '\\\"%s\\\" \\\"%s\\\" build_ext --inplace' to build.\" % (\n-                    sys.executable, os.path.join(dirname, 'setup_cython.py')))\n+                #log_error_once(\"warning: Debugger speedups using cython not found. Run '\\\"%s\\\" \\\"%s\\\" build_ext --inplace' to build.\" % (\n+                #    sys.executable, os.path.join(dirname, 'setup_cython.py')))\n+                pass\n             else:\n                 show_frame_eval_warning = True\n", "issue": "New debugger displays warnings about `speeds using cython not found`\n@DonJayamanne commented on [Mon Jan 28 2019](https://github.com/Microsoft/vscode-python/issues/4190)\r\n\r\nOld version of PTVSD didn't display this warning, new version of PTVDS does.\r\n\r\nHere's the old version:\r\n<img width=\"924\" alt=\"screen shot 2019-01-28 at 4 46 12 pm\" src=\"https://user-images.githubusercontent.com/1948812/51876152-732e9580-231c-11e9-950c-2daf36348496.png\">\r\n\r\nHere's the output from the new version:\r\n<img width=\"924\" alt=\"screen shot 2019-01-28 at 4 46 54 pm\" src=\"https://user-images.githubusercontent.com/1948812/51876162-7aee3a00-231c-11e9-926e-edc7c3a7991d.png\">\r\n\r\n\r\nI consider this a P1 as we're displaying warnings that we didn't (removed) in previous versions. This will end up confusing users.\r\n\r\n\n", "before_files": [{"content": "import os\nimport sys\n\nfrom _pydevd_bundle.pydevd_constants import IS_PYCHARM\n\nIS_PY36_OR_GREATER = sys.version_info >= (3, 6)\n\nframe_eval_func = None\nstop_frame_eval = None\ndummy_trace_dispatch = None\nshow_frame_eval_warning = False\nclear_thread_local_info = None\n\n# \"NO\" means we should not use frame evaluation, 'YES' we should use it (and fail if not there) and unspecified uses if possible.\nuse_frame_eval = os.environ.get('PYDEVD_USE_FRAME_EVAL', None)\n\nif use_frame_eval == 'NO':\n    pass\n\nelif use_frame_eval == 'YES':\n    # Fail if unable to use\n    from _pydevd_frame_eval.pydevd_frame_eval_cython_wrapper import frame_eval_func, stop_frame_eval, dummy_trace_dispatch, clear_thread_local_info\n\nelif use_frame_eval is None:\n    # Try to use if possible\n    if IS_PY36_OR_GREATER:\n        try:\n            from _pydevd_frame_eval.pydevd_frame_eval_cython_wrapper import frame_eval_func, stop_frame_eval, dummy_trace_dispatch, clear_thread_local_info\n        except ImportError:\n            from _pydev_bundle.pydev_monkey import log_error_once\n\n            dirname = os.path.dirname(os.path.dirname(__file__))\n            if not IS_PYCHARM:\n                log_error_once(\"warning: Debugger speedups using cython not found. Run '\\\"%s\\\" \\\"%s\\\" build_ext --inplace' to build.\" % (\n                    sys.executable, os.path.join(dirname, 'setup_cython.py')))\n            else:\n                show_frame_eval_warning = True\n\nelse:\n    raise RuntimeError('Unexpected value for PYDEVD_USE_FRAME_EVAL: %s (accepted: YES, NO)' % (use_frame_eval,))\n", "path": "src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py"}, {"content": "# Defines which version of the trace_dispatch we'll use.\n# Should give warning only here if cython is not available but supported.\n\nimport os\nimport sys\nfrom _pydevd_bundle.pydevd_constants import CYTHON_SUPPORTED\n\n\nuse_cython = os.getenv('PYDEVD_USE_CYTHON', None)\ndirname = os.path.dirname(os.path.dirname(__file__))\n# Do not show incorrect warning for .egg files for Remote debugger\nif not CYTHON_SUPPORTED or dirname.endswith('.egg'):\n    # Do not try to import cython extensions if cython isn't supported\n    use_cython = 'NO'\n\n\ndef delete_old_compiled_extensions():\n    import _pydevd_bundle_ext\n    cython_extensions_dir = os.path.dirname(os.path.dirname(_pydevd_bundle_ext.__file__))\n    _pydevd_bundle_ext_dir = os.path.dirname(_pydevd_bundle_ext.__file__)\n    _pydevd_frame_eval_ext_dir = os.path.join(cython_extensions_dir, '_pydevd_frame_eval_ext')\n    try:\n        import shutil\n        for file in os.listdir(_pydevd_bundle_ext_dir):\n            if file.startswith(\"pydevd\") and file.endswith(\".so\"):\n                os.remove(os.path.join(_pydevd_bundle_ext_dir, file))\n        for file in os.listdir(_pydevd_frame_eval_ext_dir):\n            if file.startswith(\"pydevd\") and file.endswith(\".so\"):\n                os.remove(os.path.join(_pydevd_frame_eval_ext_dir, file))\n        build_dir = os.path.join(cython_extensions_dir, \"build\")\n        if os.path.exists(build_dir):\n            shutil.rmtree(os.path.join(cython_extensions_dir, \"build\"))\n    except OSError:\n        from _pydev_bundle.pydev_monkey import log_error_once\n        log_error_once(\"warning: failed to delete old cython speedups. Please delete all *.so files from the directories \"\n                       \"\\\"%s\\\" and \\\"%s\\\"\" % (_pydevd_bundle_ext_dir, _pydevd_frame_eval_ext_dir))\n\n\nif use_cython == 'YES':\n    # We must import the cython version if forcing cython\n    from _pydevd_bundle.pydevd_cython_wrapper import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func\n\nelif use_cython == 'NO':\n    # Use the regular version if not forcing cython\n    from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func  # @UnusedImport\n\nelif use_cython is None:\n    # Regular: use fallback if not found and give message to user\n    try:\n        from _pydevd_bundle.pydevd_cython_wrapper import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func\n\n        # This version number is always available\n        from _pydevd_bundle.pydevd_additional_thread_info_regular import version as regular_version\n        # This version number from the already compiled cython extension\n        from _pydevd_bundle.pydevd_cython_wrapper import version as cython_version\n        if cython_version != regular_version:\n            delete_old_compiled_extensions()\n            raise ImportError()\n\n    except ImportError:\n        from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func  # @UnusedImport\n        from _pydev_bundle.pydev_monkey import log_error_once\n\n        log_error_once(\"warning: Debugger speedups using cython not found. Run '\\\"%s\\\" \\\"%s\\\" build_ext --inplace' to build.\" % (\n            sys.executable, os.path.join(dirname, 'setup_cython.py')))\n\nelse:\n    raise RuntimeError('Unexpected value for PYDEVD_USE_CYTHON: %s (accepted: YES, NO)' % (use_cython,))\n\n\n", "path": "src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py"}, {"content": "from importlib import import_module\nimport warnings\n\nfrom . import check_modules, prefix_matcher, preimport, vendored\n\n\n# Ensure that pydevd is our vendored copy.\n_unvendored, _ = check_modules('pydevd',\n                               prefix_matcher('pydev', '_pydev'))\nif _unvendored:\n    _unvendored = sorted(_unvendored.values())\n    msg = 'incompatible copy of pydevd already imported'\n    #raise ImportError(msg)\n    warnings.warn(msg + ':\\n {}'.format('\\n  '.join(_unvendored)))\n\n\n# Constants must be set before importing any other pydevd module\n# # due to heavy use of \"from\" in them.\nwith vendored('pydevd'):\n    pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')\n# Disable this, since we aren't packaging the Cython modules at the moment.\npydevd_constants.CYTHON_SUPPORTED = False\n# We limit representation size in our representation provider when needed.\npydevd_constants.MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 2**32\n\n\n# Now make sure all the top-level modules and packages in pydevd are\n# loaded.  Any pydevd modules that aren't loaded at this point, will\n# be loaded using their parent package's __path__ (i.e. one of the\n# following).\npreimport('pydevd', [\n    '_pydev_bundle',\n    '_pydev_imps',\n    '_pydev_runfiles',\n    '_pydevd_bundle',\n    '_pydevd_frame_eval',\n    'pydev_ipython',\n    'pydevd_concurrency_analyser',\n    'pydevd_plugins',\n    'pydevd',\n])\n\n# When pydevd is imported it sets the breakpoint behavior, but it needs to be\n# overridden because the pydevd version will connect to the remote debugger by\n# default, but without using the ptvsd protocol (so, we need to use the ptvsd\n# API to handle things as expected by the debug adapter).\nimport pydevd  # noqa\nimport ptvsd  # noqa\n\n\ndef ptvsd_breakpointhook():\n    ptvsd.break_into_debugger()\n\n\npydevd.install_breakpointhook(ptvsd_breakpointhook)\n", "path": "src/ptvsd/_vendored/force_pydevd.py"}], "after_files": [{"content": "import os\nimport sys\n\nfrom _pydevd_bundle.pydevd_constants import IS_PYCHARM\n\nIS_PY36_OR_GREATER = sys.version_info >= (3, 6)\n\nframe_eval_func = None\nstop_frame_eval = None\ndummy_trace_dispatch = None\nshow_frame_eval_warning = False\nclear_thread_local_info = None\n\n# \"NO\" means we should not use frame evaluation, 'YES' we should use it (and fail if not there) and unspecified uses if possible.\nuse_frame_eval = os.environ.get('PYDEVD_USE_FRAME_EVAL', None)\n\nif use_frame_eval == 'NO':\n    pass\n\nelif use_frame_eval == 'YES':\n    # Fail if unable to use\n    from _pydevd_frame_eval.pydevd_frame_eval_cython_wrapper import frame_eval_func, stop_frame_eval, dummy_trace_dispatch, clear_thread_local_info\n\nelif use_frame_eval is None:\n    # Try to use if possible\n    if IS_PY36_OR_GREATER:\n        try:\n            from _pydevd_frame_eval.pydevd_frame_eval_cython_wrapper import frame_eval_func, stop_frame_eval, dummy_trace_dispatch, clear_thread_local_info\n        except ImportError:\n            from _pydev_bundle.pydev_monkey import log_error_once\n\n            dirname = os.path.dirname(os.path.dirname(__file__))\n            if not IS_PYCHARM:\n                #log_error_once(\"warning: Debugger speedups using cython not found. Run '\\\"%s\\\" \\\"%s\\\" build_ext --inplace' to build.\" % (\n                #    sys.executable, os.path.join(dirname, 'setup_cython.py')))\n                pass\n            else:\n                show_frame_eval_warning = True\n\nelse:\n    raise RuntimeError('Unexpected value for PYDEVD_USE_FRAME_EVAL: %s (accepted: YES, NO)' % (use_frame_eval,))\n", "path": "src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py"}, {"content": "# Defines which version of the trace_dispatch we'll use.\n# Should give warning only here if cython is not available but supported.\n\nimport os\nimport sys\nfrom _pydevd_bundle.pydevd_constants import CYTHON_SUPPORTED\n\n\nuse_cython = os.getenv('PYDEVD_USE_CYTHON', None)\ndirname = os.path.dirname(os.path.dirname(__file__))\n# Do not show incorrect warning for .egg files for Remote debugger\nif not CYTHON_SUPPORTED or dirname.endswith('.egg'):\n    # Do not try to import cython extensions if cython isn't supported\n    use_cython = 'NO'\n\n\ndef delete_old_compiled_extensions():\n    import _pydevd_bundle_ext\n    cython_extensions_dir = os.path.dirname(os.path.dirname(_pydevd_bundle_ext.__file__))\n    _pydevd_bundle_ext_dir = os.path.dirname(_pydevd_bundle_ext.__file__)\n    _pydevd_frame_eval_ext_dir = os.path.join(cython_extensions_dir, '_pydevd_frame_eval_ext')\n    try:\n        import shutil\n        for file in os.listdir(_pydevd_bundle_ext_dir):\n            if file.startswith(\"pydevd\") and file.endswith(\".so\"):\n                os.remove(os.path.join(_pydevd_bundle_ext_dir, file))\n        for file in os.listdir(_pydevd_frame_eval_ext_dir):\n            if file.startswith(\"pydevd\") and file.endswith(\".so\"):\n                os.remove(os.path.join(_pydevd_frame_eval_ext_dir, file))\n        build_dir = os.path.join(cython_extensions_dir, \"build\")\n        if os.path.exists(build_dir):\n            shutil.rmtree(os.path.join(cython_extensions_dir, \"build\"))\n    except OSError:\n        from _pydev_bundle.pydev_monkey import log_error_once\n        log_error_once(\"warning: failed to delete old cython speedups. Please delete all *.so files from the directories \"\n                       \"\\\"%s\\\" and \\\"%s\\\"\" % (_pydevd_bundle_ext_dir, _pydevd_frame_eval_ext_dir))\n\n\nif use_cython == 'YES':\n    # We must import the cython version if forcing cython\n    from _pydevd_bundle.pydevd_cython_wrapper import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func\n\nelif use_cython == 'NO':\n    # Use the regular version if not forcing cython\n    from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func  # @UnusedImport\n\nelif use_cython is None:\n    # Regular: use fallback if not found and give message to user\n    try:\n        from _pydevd_bundle.pydevd_cython_wrapper import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func\n\n        # This version number is always available\n        from _pydevd_bundle.pydevd_additional_thread_info_regular import version as regular_version\n        # This version number from the already compiled cython extension\n        from _pydevd_bundle.pydevd_cython_wrapper import version as cython_version\n        if cython_version != regular_version:\n            delete_old_compiled_extensions()\n            raise ImportError()\n\n    except ImportError:\n        from _pydevd_bundle.pydevd_trace_dispatch_regular import trace_dispatch, global_cache_skips, global_cache_frame_skips, fix_top_level_trace_and_get_trace_func  # @UnusedImport\n        #from _pydev_bundle.pydev_monkey import log_error_once\n\n        #log_error_once(\"warning: Debugger speedups using cython not found. Run '\\\"%s\\\" \\\"%s\\\" build_ext --inplace' to build.\" % (\n        #    sys.executable, os.path.join(dirname, 'setup_cython.py')))\n        pass\n\nelse:\n    raise RuntimeError('Unexpected value for PYDEVD_USE_CYTHON: %s (accepted: YES, NO)' % (use_cython,))\n\n\n", "path": "src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py"}, {"content": "from importlib import import_module\nimport warnings\n\nfrom . import check_modules, prefix_matcher, preimport, vendored\n\n\n# Ensure that pydevd is our vendored copy.\n_unvendored, _ = check_modules('pydevd',\n                               prefix_matcher('pydev', '_pydev'))\nif _unvendored:\n    _unvendored = sorted(_unvendored.values())\n    msg = 'incompatible copy of pydevd already imported'\n    #raise ImportError(msg)\n    warnings.warn(msg + ':\\n {}'.format('\\n  '.join(_unvendored)))\n\n\n# Constants must be set before importing any other pydevd module\n# # due to heavy use of \"from\" in them.\nwith vendored('pydevd'):\n    pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')\n# TODO: figure out what the appropriate setting is to work for both wheels and sdist.\npydevd_constants.CYTHON_SUPPORTED = False\n# We limit representation size in our representation provider when needed.\npydevd_constants.MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 2**32\n\n\n# Now make sure all the top-level modules and packages in pydevd are\n# loaded.  Any pydevd modules that aren't loaded at this point, will\n# be loaded using their parent package's __path__ (i.e. one of the\n# following).\npreimport('pydevd', [\n    '_pydev_bundle',\n    '_pydev_imps',\n    '_pydev_runfiles',\n    '_pydevd_bundle',\n    '_pydevd_frame_eval',\n    'pydev_ipython',\n    'pydevd_concurrency_analyser',\n    'pydevd_plugins',\n    'pydevd',\n])\n\n# When pydevd is imported it sets the breakpoint behavior, but it needs to be\n# overridden because the pydevd version will connect to the remote debugger by\n# default, but without using the ptvsd protocol (so, we need to use the ptvsd\n# API to handle things as expected by the debug adapter).\nimport pydevd  # noqa\nimport ptvsd  # noqa\n\n\ndef ptvsd_breakpointhook():\n    ptvsd.break_into_debugger()\n\n\npydevd.install_breakpointhook(ptvsd_breakpointhook)\n", "path": "src/ptvsd/_vendored/force_pydevd.py"}]}