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

clientOS flag causes: unable to find translation #1257

Open
karthiknadig opened this issue Apr 3, 2023 · 12 comments
Open

clientOS flag causes: unable to find translation #1257

karthiknadig opened this issue Apr 3, 2023 · 12 comments
Labels
bug Something isn't working P1

Comments

@karthiknadig
Copy link
Member

          > We need to set clientOS flag in all scenarios (launch and attach) in the debugOptions.

Hey, I'm running into this issue when upgrading to v2023.4.1 or the latest v2023.6.0

I'm getting the following error when trying to attach to a remote process using the following configurations

Error:
pydev debugger: unable to find translation for: "d:\vscode-init\debuger-test\main.py" in ["D:\vscode-init\debuger-test/", "D:\vscode-init\debuger-test"] (please revise your path mappings).

Launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug",
            "type": "python",
            "request": "attach",
            "clientOS": "windows",
            "connect": {
                "host": "localhost",
                "port": 5678
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceRoot}",
                    "remoteRoot": "/app"
                }
            ]
        }
    ]
}

Environment Information:

  • Windows 10 Enterprise
  • vscode-python v2023.4.1

NOTE: It works with/without using "clientOS": "windows" when using v2023.4.0

Originally posted by @rjra2611 in microsoft/vscode-python#20407 (comment)

@int19h
Copy link
Contributor

int19h commented Apr 3, 2023

Could you share the logs for the debuggee? If you're using CLI, then debugpy --log-to {dir} will do the trick; for API, it's debugpy.log_to(...).

@int19h int19h added bug Something isn't working waiting for response labels Apr 3, 2023
@rjra2611
Copy link

rjra2611 commented Apr 4, 2023

Please find the following logs from my run

debugpy.adapter-186.log
debugpy.server-1.log

@int19h
Copy link
Contributor

int19h commented Apr 4, 2023

One thing that stands out is that the paths it's matching against all have lowercase drive letter, but the path mapping uses uppercase. This shouldn't make a difference, but there were bugs around that before, so it might be worthwhile to try switching to lowercase - "d:\" etc - and see if it helps.

@rjra2611
Copy link

rjra2611 commented Apr 5, 2023

True, but I haven't hardcoded any path myself in the debug configurations. I'm using ${workspaceRoot}

Launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Debug",
            "type": "python",
            "request": "attach",
            "clientOS": "windows",
            "connect": {
                "host": "localhost",
                "port": 5678
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceRoot}",
                    "remoteRoot": "/app"
                }
            ]
        }
    ]
}

@rjra2611
Copy link

Are there any updates on this? Is there a way I can help reproduce the issue? Thanks @int19h

@int19h
Copy link
Contributor

int19h commented Apr 12, 2023

My apologies. Can you try putting the full path there manually (with a lowercase letter) and see if that helps? It might be that there is a VSCode behavior change here that we need to adjust to.

@rjra2611
Copy link

rjra2611 commented May 5, 2023

Hey @int19h,

Sorry for the delay in response. I was able to reproduce the issue today as well using v2023.8.0

I tried using lowercase letter as suggested but that didn't work too. Attaching the debug logs

debugpy.adapter-221.log
debugpy.server-1.log

Please let me know if I need to do any more things and provide additional logs.

@rjra2611
Copy link

rjra2611 commented May 5, 2023

To elaborate, when using lowercase, I don't get the same (pydev debugger: unable to find translation for) error. But this time the breakpoints don't hit

@rjra2611
Copy link

Hey, @int19h

I wanted to ask if there was any progress on the issue. I also tried using "clientOS": "windows" config along with lowercase "d:\" path mappings but the breakpoints still don't hit

debugpy.adapter-220.log
debugpy.server-1.log

@geonord
Copy link

geonord commented May 17, 2023

Hey, @int19h

I wanted to ask if there was any progress on the issue. I also tried using "clientOS": "windows" config along with lowercase "d:\" path mappings but the breakpoints still don't hit

debugpy.adapter-220.log debugpy.server-1.log

I can confirm, have this same. Small letter helps, but debugger still not stop in breakpoints.

@rjra2611
Copy link

rjra2611 commented Jul 6, 2023

Hey @int19h @karthiknadig

Wanted to follow up on the issue, I faced the same issue today as well when using v2023.13.11871009 Pre-Release of ms-python.python. I shared the debug logs using lowercase paths as well here

@rjra2611
Copy link

rjra2611 commented Jul 6, 2023

It would also be very helpful to know if there is any workaround to tackle this issue for now. Thanks

@judej judej added P1 and removed user responded labels Jan 3, 2024
@judej judej assigned debonte and unassigned debonte Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

No branches or pull requests

6 participants