Skip to content

Python Debugger - using python in interactive mode via PYTHONINSPECT #5497

@rafazaya

Description

@rafazaya

Issue Type: Bug

It looks like the VS Code does not correctly handle the PYTHONINSPECT environment variable (equivalent of doing python.exe -i)

testing.py

a = 2

launch.json

    {
        "name": "vtest",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal",
        "env": {
            "PYTHONINSPECT": "equivalent of python.exe -i"
        },
        "cwd": "${workspaceRoot}",
    }

Using that debugger to debug testing.py, you'll see that the interactive mode launches. If you type 1+1 in that REPL you get 2 back. But if you type 'a' to get 2, you get a stdin error like below:
image

Extension version: 2019.4.11987
VS Code version: Code 1.33.1 (51b0b28134d51361cf996d2f0a1c698247aeabd8, 2019-04-11T08:27:14.102Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 x 2904)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 15.90GB (7.06GB free)
Process Argv
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions