eclipse-theia/theia

can't debug current python file which is opened in preview mode

Open

#6,911 opened on Jan 19, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (2,478 forks)batch import
bugeditor-previewhelp wantedvariable-resolver

Repository metrics

Stars
 (18,676 stars)
PR merge metrics
 (Avg merge 15d 4h) (75 merged PRs in 30d)

Description

Description

After opening a python file in preview mode(single-clicked) and click start debugging or press F5, then a notification of File does not exist. "${file}" showed in the bottom right corner.

image

Reproduction Steps

1 download python extension(https://marketplace.visualstudio.com/items?itemName=ms-python.python) 2 build theia browser example 3 setup workspace

cat << 'EOF' > test.py

if __name__ == "__main__":
    print("Hello World!")
EOF
mkdir .theia
cat << 'EOF' > .theia/launch.json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        }
    ]
}
EOF

3 single click test.py and press F5

OS and Theia version: OS: centos 7 theia: https://github.com/eclipse-theia/theia/commit/6f1651655d879a2a00a30d6aa46eeb86f7834b13 Diagnostics:

Contributor guide