Skip to content

Update Pyramid debug template to use python -m pyramid.scripts.pserve #2427

Closed
@JDeuce

Description

@JDeuce

Hi there has been an issue reported before where the "Pyramid" debug option tries to find the wrong pserve on some platforms.

#530

The fix was submitted here:

f22b451

And it added this block of code to fix it, which uses pserve.exe on Windows and pserve on everything else:
https://github.com/jpfarias/vscode-python/blob/master/src/client/debugger/Main.ts#L217-L224

I don't believe this fix was sufficient as today using VSCode 1.26.1 and vscode-python 2018.7.1 I was getting launch error Unable to locate 'pserve.py' required for debugging Pyramid application

Solution for me was to just not try to use the "program" launch style, but instead use the "module" launch style like the "flask" example. I think you guys should consider changing the default to this as it is simpler to understand ..... and deprecate the custom DebugOption as it is not required nor simpler:

    {
            "name": "Python: Pyramid",
            "type": "python",
            "request": "launch",
            "module": "pyramid.scripts.pserve",
            "args": [
                "${workspaceFolder}/development.ini"
            ],
            "debugOptions": [
                "RedirectOutput",
            ]
        }

Metadata

Metadata

Labels

area-debuggingdebtCovers everything internal: CI, testing, refactoring of the codebase, etc.good first issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions