Skip to content

Remote debugging failed with warning "pydev debugger: warning: try to add breakpoint to file that does not exist" #5094

Closed

Description

@xiaofeng0123

Visual Studio Code - Insiders: 1.33.0-insider
python-insider: 2019.4.6365-alpha
ptvsd version: 4.2.6

Repro step:

  1. Create a python file named remote_debug.py with below code:
    import ptvsd
    ptvsd.enable_attach(('IP of unbuntu',5678))
    ptvsd.wait_for_attach()
    for i in range(1,10,2):
    print(i)
    print('demo done')
  2. Copy this file to ubuntu which should include ptvsd installed with same version as current machine
  3. Execute python file in ubuntu:
    python3 remote_debug.py
  4. In VSC, set DEBUG to "Python:Remote Attach", and set the path mappings and host value
    image
  5. Set breakpoint on current machine and press F5 to start debugging

Actual Result:
Fail to hit breakpoint with warning "pydev debugger: warning: trying to add breakpoint to file that does not exist..."
image

Expect Result:
It should hit breakpoint

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Apr 3, 2019
  2. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Apr 3, 2019
  3. cicorias commented on Apr 15, 2019

    @cicorias
    Member

    same issue i'm having now as well.

    launch.json that works: workspaceFolder is c:\g\rfid

    {
      "version": "0.2.0",
      "configurations": [
        {
          "name": "rfidreader attach nix",
          "type": "python",
          "request": "attach",
          "port": 5678,
          "host": "localhost",
          "logToFile": false,
          "redirectOutput": true,
          "pathMappings": [
            {
              "localRoot": "${workspaceFolder}/modules/rfidreader/",
              "remoteRoot": "/app/"
            }
          ],
          "windows": {
            "pathMappings": [
              {
                "localRoot": "c:\\g\\venv\\rfid\\modules\\rfidreader\\",
    
                
                "remoteRoot": "/app"
              }
            ]
          }    
        }
      ]
    }
    

    one that fails

    {
      "version": "0.2.0",
      "configurations": [
        {
          "name": "rfidreader attach nix",
          "type": "python",
          "request": "attach",
          "port": 5678,
          "host": "localhost",
          "logToFile": false,
          "redirectOutput": true,
          "pathMappings": [
            {
              "localRoot": "${workspaceFolder}/modules/rfidreader/",
              "remoteRoot": "/app/"
            }
          ],
          "windows": {
            "pathMappings": [
              {
                "localRoot": "${workspaceFolder}\\modules\\rfidreader\\",
                "remoteRoot": "/app"
              }
            ]
          }    
        }
      ]
    }
    

    v

  4. DonJayamanne commented on May 22, 2019

    @DonJayamanne

    Upstream issue has been resolved

  5. locked as resolved and limited conversation to collaborators on May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions