Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow relative paths in the 'remotePath' for a launch.json #1803

Merged
merged 7 commits into from
Jan 9, 2025

Conversation

rchiodo
Copy link
Contributor

@rchiodo rchiodo commented Jan 9, 2025

Partial fix for #1301

Users in issue 1301 were attempting to do something like so:

"pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "." // <-- '.' is not supported here.
                }
            ]

In pydevd this isn't supported. The remote and local roots have to be fully specified. This is a pain in a shared situation though as you can pass environment variables for the local path but not the remote.

This change allows the user to have a relative (to the current working directory) for the remote path.

@rchiodo rchiodo requested a review from a team as a code owner January 9, 2025 21:24
@@ -747,6 +753,16 @@ def setup_client_server_paths(paths):
initial_paths_with_end_sep.append((path0, path1))
paths_from_eclipse_to_python_with_end_sep.append((_normcase_from_client(path0), normcase(path1)))

if DEBUG_CLIENT_SERVER_TRANSLATION:
pydev_log.critical(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is crazy to read 😆

@rchiodo rchiodo merged commit d266361 into microsoft:main Jan 9, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants