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

launch.json Pyramid debug option tries to launch the wrong program on Windows #519

Closed
andrew-fuchs opened this issue Jan 2, 2018 · 0 comments · Fixed by #530
Closed
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug good first issue
Milestone

Comments

@andrew-fuchs
Copy link

Environment data

VS Code version: 1.19.1
Python Extension version: 0.9.1
Python Version: 3.6.3
OS and version: Windows 10 (10.0.16299 Build 16299)

Actual behavior

On Windows when a python launch configuration is used where Pyramid is included in the configuration's debugOptions list, the extension tries to launch the wrong program. Instead of launching pserve.exe, the extension tries to launch pserve which results in an error.

File does not exist. "[Workspace Directory]\partfinder\env\Scripts\pserve"

Expected behavior

The appropriate program (pserve.exe) should be launched.

Steps to reproduce:

  • On Windows, install Visual Studio Code with the ms-python.python extension.
  • Create a new folder and open it with Visual Studio Code.
  • Set up a virtual environment with python -m venv env.
  • Install Pyramid with env/Scripts/pip.exe install pyramid.
  • Configure your python.pythonPath setting for your workspace, by saving the following into .vscode/settings.json:
{
    "python.pythonPath": "${workspaceFolder}/env/Scripts/python.exe"
}
  • Save the following into .vscode/launch.json:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Pyramid",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "cwd": "${workspaceFolder}",
            "env": {},
            "envFile": "${workspaceFolder}/.env",
            "args": [
                "${workspaceFolder}/development.ini"
            ],
            "debugOptions": [
                "RedirectOutput",
                "Pyramid"
            ]
        }
    ]
}
  • Try to start debugging, using the Python: Pyramid launch configuration

Logs

Output from Python output panel

[Nothing is outputted]

Output from Console window (Help->Developer Tools menu)

messageService.ts:126 File does not exist. "[Workspace Folder]\partfinder\env\Scripts\pserve"
@DonJayamanne DonJayamanne added awaiting 2-PR area-debugging good first issue bug Issue identified by VS Code Team member as probable bug labels Jan 2, 2018
@DonJayamanne DonJayamanne added this to the January 2018 milestone Jan 4, 2018
DonJayamanne pushed a commit that referenced this issue Jan 4, 2018
The debugger tries to find pserve on all platforms but on windows the correct file name should be pserve.exe.

Fixes #519
@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants