AlansCodeLog / blender-debugger-for-vscode

Blender addon for remote debugging Blender with VS Code (and Visual Studio)
GNU General Public License v3.0
307 stars 36 forks source link

ECONNREFUSED 127.0.0.1:5678 error in VSCode #32

Closed K-Meech closed 1 year ago

K-Meech commented 1 year ago

OS: Windows 10

Add-on Version: 2.2.1

Blender Version: 2.90.1

VS Code Version: 1.75.0

VS Code Python Extension Version: 2023.2.0

debugpy version: 1.6.6

Both the blender addon + vscode use python from a conda environment with debugpy installed: ~\anaconda3\envs\debugpy\python.exe

VSCode can connect to the test.py script, but not to Blender - giving an 'ECONNREFUSED 127.0.0.1:5678' error. The debug server seems to start successfully with the Blender addon - printing Waiting... (on port 5678) to the terminal.

Thanks for your help!

q8f13 commented 1 year ago

Same issue here

OS: Windows 10 22H2 Blender Version: 3.3.5 VSCode Version:1.77.2 VS Code Python Extension Version: 2023.6.0 debugpy version: 1.6.6

AlansCodeLog commented 1 year ago

Sorry for the delay, I've been busy. I took a quick look, but I'm currently on linux, and at least there I cannot replicate... :confused:

The message is straight from debugpy and not generated by the add-on, so something is causing it to refuse the connection. Strange that you can connect to the test script.

I would try seeing if there's something on that port still running? Maybe the script didn't quit correctly? Also maybe try changing the port. This needs to be done both in the vscode debug config and in the addon config in blender.

K-Meech commented 1 year ago

Thanks @AlansCodeLog. Finally got back to trying this again (with Blender 3.4) - and now it works for me! I think the script must have not quit correctly.