Всякий раз, когда я пытаюсь отладить код python, vscode выдает ошибку и сообщает мне, что в соединении отладчика было отказано. Я прикрепил полную трассировку стека внизу
Я на CentOS8 Linux.
Пока я пробовал:
- SE Linux выключен
- брандмауэр отключен
- удаление vscode
- удалить /home/user/.vscode
- удалить /home/user/.config/Code
- очистить переменные среды
Не совсем то, что может вмешиваться здесь.
Файл, который я отлаживаю, print('test')
сохранен как test.py: -)
/usr/bin/python /home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/ptvsd_launcher.py --default --client --host localhost --port 43259 /scratch/user/tmp/test.py
E00000.119: Exception escaped from start_client
Traceback (most recent call last):
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/log.py", line 110, in g
return f(*args, **kwargs)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/pydevd_hooks.py", line 74, in start_client
sock, start_session = daemon.start_client((host, port))
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/daemon.py", line 217, in start_client
connect(client, addr)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/socket.py", line 197, in connect
sock.connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused
Traceback (most recent call last):
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/__main__.py", line 432, in main
run()
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/__main__.py", line 300, in run_file
setup_connection()
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/__main__.py", line 291, in setup_connection
daemon = ptvsd._remote.attach(addr)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/_remote.py", line 95, in attach
patch_multiprocessing=ptvsd.options.multiprocess)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/_vendored/pydevd/pydevd.py", line 2179, in settrace
wait_for_ready_to_run,
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/_vendored/pydevd/pydevd.py", line 2230, in _locked_settrace
debugger.connect(host, port) # Note: connect can raise error.
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/_vendored/pydevd/pydevd.py", line 1060, in connect
s = start_client(host, port)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/pydevd_hooks.py", line 136, in _start_client
return start_client(daemon, h, p)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/log.py", line 110, in g
return f(*args, **kwargs)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/pydevd_hooks.py", line 74, in start_client
sock, start_session = daemon.start_client((host, port))
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/daemon.py", line 217, in start_client
connect(client, addr)
File "/home/user/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/lib/python/old_ptvsd/ptvsd/socket.py", line 197, in connect
sock.connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused
dmaarten