PTVS Could not connecto to remote python process

Mar 17 at 9:18 AM
Edited Mar 17 at 9:30 AM
Hallo,

i have the following problem:
I have extended my application with ironpython. I store all my ironpython script in a database and load them when they are needed. No i want to debug those scripts with the PTVS. I've implemented them (i think so) successful. But always when i try to start remote-debugging, i get the following error:
Could not connect to remote Python process at 'localhost:5678'. Make sure that the process is running, and has called ptvsd.enable_attach()
Does anyone have an idea what i do wrong?

I've posted the same question here: StackOverflow but didn't get any useful answer.

Thank you!
Mar 28 at 3:20 AM
posted an answer to stackoverflow. In case nothing works(You could not even connect to remote debugger), You probably need to debug attach_server.py, the socket part.
There is exception during connect somewhere in debugger. Where it fails - we can only guess. You'd better find it by yourself. attach_server.py is small enough to debug it in several hours.
Coordinator
Mar 28 at 4:34 AM
noangel, did you run into a similar issue and had to debug it? If so, can you tell more about how you fixed it?

Even if it's completely unrelated, it would be nice to incorporate any fixes directly into the product.
Mar 31 at 2:37 AM
Edited Mar 31 at 3:10 AM
well, in my case sys.platform returned None instead of "Windows", which caused an error.
I trying to use ptvsd in customized static-linked CPython, so it may be different in my case, but when it tells
"Could not connect to remote Python bla-bla-bla", probably in
server_thread_func() it failed somewhere between "client, addr = server.accept()" and response == INFO:<...>write_string(client, version).
So I temporary fixed it by adding return "Windows" to platform.py::system() instead of return uname()[0], sorry, Python, I know, it's a bad idea, but I have no time.

also imho, it's good idea to confirm it works in vanilla Python(==latest stable widely used official build) environment on the same PC with simple python script before check it on embedded Python.