debugpy and vscode debuggin in houdini

   1405   1   1
User Avatar
Member
4 posts
Joined: Feb. 2015
Offline
I'm trying to get python debugging working with houdini and vscode using debugpy. I'm setting up an virtual env to add libraries to houdini and my source code. I have this same code working in maya and blender. But houdini doesnt seem to be working the same way
my code running from houidni:

import os
import debugpy
hython = os.path.join(r"C:\Program Files\Side Effects Software\Houdini 19.5.303", "bin", "hython")
debugpy.configure(python=hython)
debugpy.listen(5678)
debugpy.wait_for_client()

and the result:

The attempted operation failed.
Traceback (most recent call last):
File "C:\Users\damia\Projects\projectStart\venv\Lib\site-packages\debugpy\server\api.py", line 215, in listen
sock, _ = endpoints_listener.accept()
File "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.303\python39\lib\socket.py", line 293, in accept
fd, addr = self._accept()
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "hou.session", line 5, in <module>
File "C:\Users\damia\Projects\projectStart\venv\Lib\site-packages\debugpy\public_api.py", line 31, in wrapper
return wrapped(*args, **kwargs)
File "C:\Users\damia\Projects\projectStart\venv\Lib\site-packages\debugpy\server\api.py", line 140, in debug
log.reraise_exception("{0}() failed:", func.__name__, level="info")
File "C:\Users\damia\Projects\projectStart\venv\Lib\site-packages\debugpy\server\api.py", line 138, in debug
return func(address, settrace_kwargs, **kwargs)
File "C:\Users\damia\Projects\projectStart\venv\Lib\site-packages\debugpy\server\api.py", line 229, in listen
raise RuntimeError("timed out waiting for adapter to connect")
RuntimeError: timed out waiting for adapter to connect


I cant connect vscode to houdini to debug, any suggestions would be welcome. Thank you !
User Avatar
Member
4 posts
Joined: Feb. 2015
Offline
I found a solution:

Use the py37 release of Houdini instead of default.


I'm not sure why this works, but it does.
  • Quick Links