Closed m-busch closed 4 years ago
Try using https://github.com/microsoft/debugpy on the server.
Unfortunately I do not see much valuable information. Maybe you can help ...
Started with: python3 -m debugpy --listen 0.0.0.0:5678 --log-to ./ptvsd.log app.py
Log Files: ptvsd.log/debugpy.adapter-26193.log I+00139.052: Accepted incoming Client connection from 192.168.178.10:52795. D+00139.063: Starting message loop for channel Client[2] D+00139.078: Client[2] <-- { "seq": 1, "type": "event", "event": "output", "body": { "category": "telemetry", "output": "ptvsd", "data": { "packageVersion": "1.0.0b5" } } } D+00139.086: Client[2] <-- { "seq": 2, "type": "event", "event": "output", "body": { "category": "telemetry", "output": "debugpy", "data": { "packageVersion": "1.0.0b5" } } } D+00144.052: Exiting message loop for channel Client[2]: No more messages D+00144.065: Closing Client[2] message stream I+00144.077: /handling disconnect from Client[2]/ Session[2] has ended. I+00144.084: /handling disconnect from Client[2]/ Client[2] has disconnected; finalizing Session[2]. I+00144.090: /handling disconnect from Client[2]/ Session[2] finalized.
ptvsd.log/debugpy.adapter-26193.log
CPython 3.7.3 (32-bit)
debugpy 1.0.0b5
I+00000.489: debugpy.adapter startup environment:
System paths:
sys.prefix: /usr
sys.base_prefix: /usr
sys.real_prefix:
Oh, I wonder if VS 2017 can actually connect to this version! @huguesv, do you remember if the last version of the extension for 2017 does a direct socket connection for "attach" and hands it over to VS, or it tries to wrap the DAP stream somehow?
I'm afraid you'll need to use VS 2019 to attach to debugpy.
I am unable to connect from my Windows 7 Visual Studio 2017 with "Attach to Process" to my Raspberry Pi Flask process. I search the Forum but did not fine a solution. No I hope do get a new Idea ... It seems to try to connect but then just displays this Message:
Could not connect to remote Python process at tcp:///. Make sure the process has called ptvsd.enable_attach() and is still running.
I am using: VS 2017 Pro Python 3.7.3 ptvsd 4.3.2
Env settings on my PI are:
I start flask app with one of this commands. All behave similar:
Flask App start loocks okay to me:
Tail into to the PTVSD-Log File shows strange exceptions?