Das Wissen aller Anwender nutzen

Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.

Es erwarten Sie:

  • Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
  • Tipps von User für User
  • international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch

Melden Sie sich jetzt an und diskutieren Sie mit!

Zur Registrierung

Remotely Debugging the Python code in Visual Studio [Gelöst]

Schlagworte:
  • Allplan

Dear Allplan-Python Community,

I am trying to make few Python Parts Scripts using Visual Studio 2019 and Allplan 2022. I am facing an issue with Visual studio debugging of Python Code. I have seen some similar issues related debugging of Python code but previous questions related to ptvsd and it's versions. Now the ptvsd has changed to Debuguy. I have downloaded the latest Debugpy from the below link
Debugpy: https://pypi.org/project/debugpy/

Installed the Debugpy files in the /prg/Python folder as shown in the attachment image.
Then i tried to attach the process using Python remote(debugpy).
I have tried with few connection targets mentioned below
1. tcp://192.168.29.124:5678/
2. tcp://PythonParts@127.0.0.1:5678/
3. tcp://PyhonParts@localhost/
4. tcp://localhost:5678/
5. tcp://PythonParts@localhost:5678/
Nothing worked. I have seen the error as shown in the error image in the attachments. I am not sure what is missing and what is causing the problem. I request you to help me out to resolve this issue.

Looking forward to hear back from you.

Anhänge (3)

Typ: image/png
79-mal heruntergeladen
Größe: 79,28 KiB
Typ: image/png
56-mal heruntergeladen
Größe: 25,97 KiB
Typ: image/png
61-mal heruntergeladen
Größe: 31,88 KiB

Lösung anzeigen Lösung verbergen

i Hope you have seen the info from Horst Hohmann in this post :
there is an attachment with mor infos :
https://connect.allplan.com/forum/topics/topic/topics/pythonparts/startpythondebug.html#post_316502

Your Optin 4 should to the Trick:
tcp://localhost:5678

but maybe one of the requirements is missing , diffenrent debugpy version or not installed at correct place ?

Preparation
To run a PythonParts script with debugging enabled, it’s necessary to download a Python package for the debugging support. The following packages can be used:

debugpy 1.4.1 for Allplan 2021-1-6 and higher

debugpy
debugpy is the replacement for ptvsd and can be found at https://pypi.org/project/debugpy/.

The following steps must be performed for the installation:

open https://pypi.org/project/debugpy/

select Download files

select debugpy-1.4.1.zip from the file list

open the downloaded zip file and the folder src

copy the folder debugpy to the Allplan folder ..\Prg\Python\lib\site-packages

Allplan Webentwicklung

Private messages must be private. No support request via Private message.

i Hope you have seen the info from Horst Hohmann in this post :
there is an attachment with mor infos :
https://connect.allplan.com/forum/topics/topic/topics/pythonparts/startpythondebug.html#post_316502

Your Optin 4 should to the Trick:
tcp://localhost:5678

but maybe one of the requirements is missing , diffenrent debugpy version or not installed at correct place ?

Preparation
To run a PythonParts script with debugging enabled, it’s necessary to download a Python package for the debugging support. The following packages can be used:

debugpy 1.4.1 for Allplan 2021-1-6 and higher

debugpy
debugpy is the replacement for ptvsd and can be found at https://pypi.org/project/debugpy/.

The following steps must be performed for the installation:

open https://pypi.org/project/debugpy/

select Download files

select debugpy-1.4.1.zip from the file list

open the downloaded zip file and the folder src

copy the folder debugpy to the Allplan folder ..\Prg\Python\lib\site-packages

Allplan Webentwicklung

Private messages must be private. No support request via Private message.

looks like the path is the problem :

.\Prg\Python\lib\site-packages

but the last picture of your post is showing you had placed it directly in :

.\Prg\Python\

Allplan Webentwicklung

Private messages must be private. No support request via Private message.

Thank You so much for your replies. It certainly helped my understanding and resolved my issue. Thank you so much for your support.