vscode-docs icon indicating copy to clipboard operation
vscode-docs copied to clipboard

Python debug configuration docs are outdated

Open PaleNeutron opened this issue 8 years ago • 9 comments

for example:

    "debugOptions": [
        "WaitOnAbnormalExit",
        "WaitOnNormalExit",
        "RedirectOutput"
    ]

Both WaitOnAbnormalExit and WaitOnNormalExit are announced as removed in VSC.

Also, console options is outdated.

I have not review the whole doc, maybe there are more difference between doc and code.

PaleNeutron avatar Feb 20 '18 04:02 PaleNeutron

@kraigb Can you have a look at this? Thanks

gregvanl avatar Feb 20 '18 17:02 gregvanl

@DonJayamanne What's current here? We're referring to: https://code.visualstudio.com/docs/python/debugging

kraigb avatar Feb 20 '18 18:02 kraigb

Both WaitOnAbnormalExit and WaitOnNormalExit are announced as removed in VSC.

Not sure what you mean by announced as removed in VSC. We have removed them from the default config, but they aren't invalid. If not provided we default to ["RedirectOutput"]

Also, console options is outdated.

Not true. This is still used. If not provided we default to none

DonJayamanne avatar Feb 20 '18 18:02 DonJayamanne

@kraigb I believe the point @PaleNeutron is trying to raise is the fact that the default debug config generated by the extension is not what's documented. This is the default debug configuration:

        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${file}",
            "cwd": "${workspaceFolder}",
            "env": {},
            "envFile": "${workspaceFolder}/.env",
            "debugOptions": [
                "RedirectOutput"
            ]
        },

On a side note, we have plans is to simplify this json as follows:

{
    "name": "Python",
    "type": "python",
    "request": "launch",
    "program": "${file}"
}

If we manage to make this change, we'll let you know.

DonJayamanne avatar Feb 20 '18 18:02 DonJayamanne

After I add WaitOnAbnormalExit to the config file, I got green line under it and a notification list all available options. I will provide a screenshot after several hours.

PaleNeutron avatar Feb 21 '18 07:02 PaleNeutron

@PaleNeutron My apologies, yes you are correct. The values WaitOnAbnormalExit and WaitOnNormalExit are no longer valid entries.

@kraigb the valid values are as follows:

"RedirectOutput",
"DebugStdLib",
"BreakOnSystemExitZero",
"DjangoDebugging",
"Sudo",
"IgnoreDjangoTemplateWarnings",
"Pyramid"

My suggestion is to just document the following:

"RedirectOutput",
"DebugStdLib",
"DjangoDebugging",
"Sudo",
"Pyramid"            // Used when debugging a Pyramid application

The reason is as follows:

  • Other entries excluded will become obsolete and are very rarely used.
  • Currently we're working on a new debugger for Python extension & some items will be redundant (the items I have excluded from the above list)

DonJayamanne avatar Feb 21 '18 07:02 DonJayamanne

Thanks a lot for the 'new debugger for Python extension'!

The current Mac version debugger not works well with 'caught unexpected'.

PaleNeutron avatar Feb 21 '18 07:02 PaleNeutron

The current Mac version debugger not works well with 'caught unexpected'.

Please raise an issue in our github repo, I'd like to look into this and find a solution for you.

DonJayamanne avatar Feb 21 '18 07:02 DonJayamanne

Edits made in https://github.com/Microsoft/vscode-docs/pull/1449.

kraigb avatar Feb 21 '18 20:02 kraigb