Skip to content

Commit 9c72a7f

Browse files
Remove deprecated ptvsd code (microsoft#10427)
* Remove deprecated ptvsd code * Update pythonFiles/visualstudio_py_testlauncher.py Co-Authored-By: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com>
1 parent cd7175a commit 9c72a7f

2 files changed

Lines changed: 1 addition & 30 deletions

File tree

‎pythonFiles/testlauncher.py‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,6 @@ def parse_argv():
1616
return (sys.argv[1], sys.argv[2], sys.argv[3:])
1717

1818

19-
def exclude_current_file_from_debugger():
20-
# Load the debugger package
21-
try:
22-
import ptvsd
23-
except:
24-
traceback.print_exc()
25-
print(
26-
"""
27-
Internal error detected. Please copy the above traceback and report at
28-
https://github.com/Microsoft/vscode-python/issues/new
29-
30-
Press Enter to close. . ."""
31-
)
32-
try:
33-
raw_input()
34-
except NameError:
35-
input()
36-
sys.exit(1)
37-
38-
3919
def run(cwd, testRunner, args):
4020
"""Runs the test
4121
cwd -- the current directory to be set
@@ -61,6 +41,5 @@ def run(cwd, testRunner, args):
6141

6242

6343
if __name__ == "__main__":
64-
exclude_current_file_from_debugger()
6544
cwd, testRunner, args = parse_argv()
6645
run(cwd, testRunner, args)

‎pythonFiles/visualstudio_py_testlauncher.py‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,6 @@ def main():
268268
)
269269
(opts, _) = parser.parse_args()
270270

271-
if opts.debug:
272-
from ptvsd.visualstudio_py_debugger import DEBUG_ENTRYPOINTS, get_code
273-
274271
sys.path[0] = os.getcwd()
275272
if opts.result_port:
276273
try:
@@ -286,12 +283,7 @@ def main():
286283
sys.stdout = _TestOutput(sys.stdout, is_stdout=True)
287284
sys.stderr = _TestOutput(sys.stderr, is_stdout=False)
288285

289-
if opts.debug:
290-
# TODO: Stop using this internal API? (See #3201.)
291-
DEBUG_ENTRYPOINTS.add(get_code(main))
292-
293-
pass
294-
elif opts.mixed_mode:
286+
if opts.mixed_mode:
295287
# For mixed-mode attach, there's no ptvsd and hence no wait_for_attach(),
296288
# so we have to use Win32 API in a loop to do the same thing.
297289
from time import sleep

0 commit comments

Comments
 (0)