I m currently doing the remote development from Linux machine. I have mounted the remote code to Visual studio code with remote-ssh extension successfully.
When I try to debug with Attach using Process Id. I'm seeing "Timed out waiting for debug server to connect." Error.
I have set the python2.7 interpreter from remote machine in VS code. With default launch.json when I run debug I'm able to see the process Ids and selected one. It throws timeout error.
Launch json : Launch.json
Log snippet:
I+00000.030: Injector[PID=13037] output:
0x00007f8f5e44a923 in ?? () from /lib64/libc.so.6
I+00000.030: Injector[PID=13037] output:
The target architecture is set automatically (currently i386:x86-64)
I+00000.030: Injector[PID=13037] output:
I+00000.030: Injector[PID=13037] output:
stderr: No symbol "dlopen" in current context.
I+00000.030: Injector[PID=13037] output:
No symbol "DoAttach" in current context.
I+00000.030: Injector[PID=13037] output:
I+00000.030: Injector[PID=13037] exited.
I+00000.030: All debug servers disconnected; waiting for remaining sessions...
E+00000.030: /handling #2 request "attach" from Client[1]/
Traceback (most recent call last):
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/common/messaging.py", line 1062, in __init__
raise self
MessageHandlingError: Timed out waiting for debug server to connect.
Stack where logged:
File "/usr/local/lib/python2.7/threading.py", line 783, in __bootstrap
self.__bootstrap_inner()
File "/usr/local/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/common/messaging.py", line 1510, in _run_handlers
handler()
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/common/messaging.py", line 747, in _handle
result = handler(self)
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/adapter/components.py", line 95, in lock_and_handle
return f(self, message)
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/adapter/clients.py", line 199, in handle
f(self, request)
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/adapter/clients.py", line 514, in attach_request
sub_pid,
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/common/messaging.py", line 560, in cant_handle
return self.error(MessageHandlingError, *args, **kwargs)
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/common/messaging.py", line 546, in error
exc = exc_type(reason, self, silent) # will log it
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/common/messaging.py", line 1064, in __init__
log.swallow_exception()
File "/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/common/log.py", line 218, in swallow_exception
_exception(format_string, *args, **kwargs)
D+00000.030: /handling #2 request "attach" from Client[1]/
Client[1] <-- {
"seq": 5,
"type": "response",
"request_seq": 2,
"success": false,
"command": "attach",
"message": "Timed out waiting for debug server to connect."
}
E+00000.030: /handling #2 request "attach" from Client[1]/
Handler 'handle' (file u'/home/vssetup/.vscode-server/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/adapter/../../debugpy/adapter/components.py', line 91)
couldn't handle #2 request "attach" from Client[1]:
Timed out waiting for debug server to connect.
D+00000.030: Client[1] --> {
"seq": 3,
"type": "request",
"command": "disconnect",
"arguments": {
"restart": false
}
}
I+00000.030: /handling #3 request "disconnect" from Client[1]/
client requested "disconnect"; finalizing Session[1].
D+00000.030: /handling #3 request "disconnect" from Client[1]/
Client[1] <-- {
"seq": 6,
"type": "event",
"event": "terminated"
}
I+00000.030: /handling #3 request "disconnect" from Client[1]/
Session[1] finalized.
D+00000.030: /handling #3 request "disconnect" from Client[1]/
Client[1] <-- {
"seq": 7,
"type": "response",
"request_seq": 3,
"success": true,
"command": "disconnect"
}