Is it possible to remotely debug IDAPyhton scripts using VSCode and ptvsd? I found a few tutorials on the net, but no one is working. In the past, using the same protocol I was able to connect to Maya from VSCode and to remotely debug Pymel scripts. So, from IDA python console I entered:
ptvsd.enable_attach(address=('localhost', 5678), redirect_output=True)
A Python MsgBox appears telling a script is running... Now in VSCode I started the script to be debugged using the standard json configuration file for attaching to a remote debugger, but the connection is always refused. I tried to change the port (3528, 3000), the address (0.0.0.0) and to remove the redirect_output flag. No matter what, I wasn't able to connect. I tried also:
But again, no luck.
As a second question, is there a way to make the import statement recognize IDAPython modules (idaapi, idc, idc_bytes and so on) or to use autocompletion? I know IDAPython is bundled with IDA and not installed in site-packages, but I wonder if is there a solution (not to execute the script outside of IDA, but to have the modules and keywords recognized).