I am trying to debug a python file in Intellij. In my Project Structure under Platform Settings - SDKs there is only one Python SDK, and it is local (located on my HD).
When I debug a python file, I notice in the console output that it is calling pydevd.py, passing 127.0.0.1 (localhost) as the client, and 55723 as the port.
As I understand it, pydevd.py is used for remote debugging python. And the issue I am having is that after I end the execution of the program I was debugging, or it finishes on its own, I have to wait 2-5 minutes before I can try to debug or even run a program, because I will get this error: socket.error: [Errno 10061] No connection could be made because the target machine actively refused it
I am using Intellij IDEA 15.0.4, on Windows 7 Enterprise.
The full debug command and resulting traceback that gets printed to the console when I debug is (with work filenames removed):
C:\Python27\python.exe C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydevd.py --multiproc --qt-support --client 127.0.0.1 --port 55723 --file C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pycharm\utrunner.py {path to python file}::{python class to run} true
Testing started at 3:26 PM ...
pydev debugger: process 12384 is connecting
Connected to pydev debugger (build 143.2287)
Traceback (most recent call last):
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydevd.py", line 2403, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydevd.py", line 1794, in run
launch(file, globals, locals) # execute the script
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pycharm\utrunner.py", line 129, in <module>
module = loadSource(a[0])
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pycharm\utrunner.py", line 41, in loadSource
module = imp.load_source(moduleName, fileName)
File "{some python file}", line 20, in <module>
from {some python class} import {some python class}
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "{some python file}", line 12, in <module>
__import__(modname)
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "{some python file}", line 17, in <module>
from {some python class} import {some python class}
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "{some python file}", line 23, in <module>
from {some python class} import {some python class}
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "{some python file}", line 17, in <module>
from {some python class} import {some python class}
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "{some python file}", line 21, in <module>
from {some python class} import {some python class}
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "{some python file}", line 15, in <module>
from {some python class} import {some python class}
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "{some python file}", line 20, in <module>
from {some python class} import {some python class}
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "{some python file}", line 21, in {some python class}
import {some python class}
File "C:\Users\stmcdonald\.IntelliJIdea15\config\plugins\python\helpers\pydev\pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "C:\Program Files (x86)\VMware\CobraWinLDTP\ldtp\__init__.py", line 555, in <module>
_populateNamespace(globals())
File "C:\Program Files (x86)\VMware\CobraWinLDTP\ldtp\__init__.py", line 227, in _populateNamespace
for method in client._client.system.listMethods():
File "C:\Python27\lib\xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "C:\Python27\lib\xmlrpclib.py", line 1575, in __request
verbose=self.__verbose
File "C:\Program Files (x86)\VMware\CobraWinLDTP\ldtp\client.py", line 136, in request
self.send_content(h, request_body)
File "C:\Python27\lib\xmlrpclib.py", line 1439, in send_content
connection.endheaders(request_body)
File "C:\Python27\lib\httplib.py", line 951, in endheaders
self._send_output(message_body)
File "C:\Python27\lib\httplib.py", line 811, in _send_output
self.send(msg)
File "C:\Python27\lib\httplib.py", line 773, in send
self.connect()
File "C:\Python27\lib\httplib.py", line 754, in connect
self.timeout, self.source_address)
File "C:\Python27\lib\socket.py", line 571, in create_connection
raise err
socket.error: [Errno 10061] No connection could be made because the target machine actively refused it
What can I do to ideally make it stop using pydevd.py in an attempt to remote debug my local file, on my local interpreter, or what can I do to stop getting [Errno 10061]
?