- This topic has 5 replies, 2 voices, and was last updated 4 years, 8 months ago by Alan.
-
AuthorPosts
-
AlanParticipantfor a very long time, the first debug run of any python script times out, with a message that the connection was actively refused by the server.
There USED TO BE an easy workaround — run it again.
Since the 2020-03-03 update, the workaround has stopped working – now, with no visible trace of the run anywhere in eclipse that I can find, I always get a message that the debug process is already running. (I kill the apparently running debug launch, remove all terminated launches, exit and close any terminals.) Other scripts will run just fine
The new workaround is extremely inconvenient and annoying:
– restart eclipse (!!! this is the really annoying part! )
– try to run some scratch script, let THAT script time out
– run the script I really want to run
support-swapnaModeratorAlan,
Sorry that you are seeing this issue with the debug.
Can you please check if installing a newer version of the Python extension resolves the problem?
1. Please download the
ms-python-release.vsix
using this link :https://github.com/microsoft/vscode-python/releases/download/2020.2.64397/ms-python-release.vsix2. Go to Help > CodeMix Extensions and disable the existing Python extension by unchecking the box besides it. Reload/restart the engine if it prompts to and then click on ‘Install from VSIX file’, browse to the downloaded vsix file and proceed to install it. Reload/restart the engine if it prompts to and then try the debug once again.
I tested the newer extension at my end and the debugger is launching fine without any issues. Please give it a try and let us know how it works for you.
Apologies for inconvenience caused.
–Swapna
Genuitec Support
AlanParticipantHi Swapna,
No, that does not completely fix the issue for me, but it helps – the connection refusal issue does not happen as often. If you have a large python script that takes a while to load, that might make the problem show up. Also, I’m on windows, eclipse 2019-12.
When I get the connection refused issue, that launch still will not run until eclipse is restarted. I still get the pop-up message ‘There is already a debug configuration “<debug config name>” running.’
Here is the complete traceback when the launch fails (I replaced the actual eclipse location with
<eclipse location>
:Traceback (most recent call last): File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\ptvsd_launcher.py", line 48, in <module> main(ptvsdArgs) File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 432, in main run() File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 300, in run_file setup_connection() File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 291, in setup_connection daemon = ptvsd._remote.attach(addr) File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\_remote.py", line 95, in attach patch_multiprocessing=ptvsd.options.multiprocess) File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 2179, in settrace wait_for_ready_to_run, File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 2230, in _locked_settrace debugger.connect(host, port) # Note: connect can raise error. File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1060, in connect s = start_client(host, port) File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\pydevd_hooks.py", line 136, in _start_client return start_client(daemon, h, p) File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\log.py", line 110, in g return f(*args, **kwargs) File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\pydevd_hooks.py", line 74, in start_client sock, start_session = daemon.start_client((host, port)) File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\daemon.py", line 217, in start_client connect(client, addr) File "<eclipse location>\eclipse\jee-latest-released\eclipse\extensions\ms-python.python-2020.2.64397\pythonFiles\lib\python\old_ptvsd\ptvsd\socket.py", line 197, in connect sock.connect(addr) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
The much bigger issue is that once I get this once, the launch that triggered it cannot be run until eclipse is restarted.
I’ve included a screenshot showing (a) the dialog and (b) NO debug launch active at all and (c) no terminal activeAttachments:
You must be logged in to view attached files.
support-swapnaModeratorAlan,
Sorry that you are still seeing the issue though not often. Thank you for the stacktrace and the screenshot. I have filed a detailed bug report for the dev team to look into this issue. We will keep you posted about the fix details.
Apologies for inconvenience caused.
–Swapna
Genuitec Support
support-swapnaModeratorAlan,
Can you please check if instead of restarting Eclipse, does restarting the CodeMix engine help launch the debug again? You can select the ‘Reload CodeMix Engine’ command from the Command Palette using Ctrl+Shift+P to restart the CodeMix engine.
Please let us know how it works for you. We are actively looking into this issue.
–Swapna
Genuitec Support
AlanParticipantThat does not fix the issue — I still get the dialog “There is already a debug configuration …”
-
AuthorPosts