This project has moved and is read-only. For the latest updates, please go here.

PTVS Could not connecto to remote python process

Mar 17, 2014 at 10:18 AM
Edited Mar 17, 2014 at 10:30 AM

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, 2014 at 4:20 AM
posted an answer to stackoverflow. In case nothing works(You could not even connect to remote debugger), You probably need to debug, 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. is small enough to debug it in several hours.
Mar 28, 2014 at 5: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, 2014 at 3:37 AM
Edited Mar 31, 2014 at 4: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 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.