fabioz / PyDev.Debugger

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

Add PYDEVD_REMOTE_ROOT support #243

Open thejcannon opened 1 year ago

thejcannon commented 1 year ago

This change intends to fix https://github.com/microsoft/debugpy/issues/1130 by allowing for a env var (PYDEVD_REMOTE_ROOT) to unconditionally configure the remote root when set in the server's environment.

thejcannon commented 1 year ago

I couldn't find a good place to add a test for this. LMK where one belongs

fabioz commented 1 year ago

Thanks for taking a look at this.

Some notes:

  1. There should be an integration test in tests_python/test_debugger_json.py (you can use another test as a base -- test_case_stop_async_iteration_exception has an example which customizes environment variables).
  2. Most constants are set in _pydevd_bundle.pydevd_constants. I think this should be a constant there (initialized from that environment variable value).
  3. If that variable is set it should be logged in pydevd._log_initial_info.
thejcannon commented 1 year ago
thejcannon commented 1 year ago

@fabioz wanna give this another look?

thejcannon commented 1 year ago

Bump

thejcannon commented 1 year ago

@fabioz are you able to take a look? :smile: