该窍门能让工作是扩展的(在唐Jayamanne的Python的)wiki页面。您必须"externalConsole": true
在launch.json
文件"name": "Python"
部分中包含设置。
扩展程序的Wiki确认默认情况下不起作用:
这允许捕获来自控制台/终端窗口应用程序的输入,这在标准VSCode调试器中是不可能的。
以下是使此功能生效的步骤:
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"program": "${file}",
"pythonPath": "C:/Users/igor/Documents/Tools/WinPython-32bit-3.4.3.7Slim/python-3.4.3/python.exe",
"externalConsole": true,
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},