Python debugging in Visual Studio 2019

Hi,

has anyone managed to attach the Visual Studio 2019 (community edition) debugger to Slicer’s python? I installed the Slicer DebuggingTools extension and followed the steps in the extension’s documentation for attaching SlicerPython to the Visual Studio 2017 debugger, but this seems to no longer apply to the 2019 version. There is no connection type “Python remote (ptvsd)”, just “Python remote (debugpy)”, but when I choose that one and input the target “tcp://slicer@localhost:5678” , it fails with an error message I don’t really understand (see screenshot) when I click “Find…”

Has someone run into this problem before? Any advice would be greatly appreciated.

Thank you very much.
Stephan

Port Selector is not implemented (not necessary) for the Python debugger. See more information here: https://github.com/Microsoft/PTVS/issues/1390#issuecomment-229479669

I’ve tried Visual Studio’s Python debugger about a year ago and it worked OK then. Visual Studio code is quite similar in capability. I usually use PyCharm because it can automatically reconnect when I restart Slicer, which is a huge convenience (you need the “professional” version, which you get for free if you are a student or have a university email address).

Thank you very much, I will give it another try soon. Otherwise I’ll install PyCharm.