fabioz / PyDev.Debugger

Sources for the debugger used in PyDev, PyCharm and VSCode Python
Eclipse Public License 1.0
434 stars 122 forks source link

pydev can't debug in ThreadingHTTPServer #205

Closed kanehekili closed 3 years ago

kanehekili commented 3 years ago

Running latest pydev in Eclipse 4.17 with python 3.9. Have a small ThreadingHTTPServer that runs its loop in "server_forever". All code invoked by the server (like do_GET) are not reachable by the debugger any more. Here a snippet, that will prevent debugging any further code:

        MyHTTPHandler.AppConnector = SomePlugin()
        server = ThreadingHTTPServer(('', int(port)),MyHTTPHandler)
        print('started httpserver...')
        server.serve_forever()

         class MyHTTPHandler(SimpleHTTPRequestHandler):
         def do_GET(self):
              print("Do Get") #will not stop on breakpoint

Using a simple "HttpServer" will work. The test can be invoked with: curl localhost:<port>/Some.Text

kanehekili commented 3 years ago

The eclipse resources have to be deleted, which leads to reimporting the workspace. It doesn't make sense, but it helps