您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

使用VSCode在Python调试期间读取输入

使用VSCode在Python调试期间读取输入

窍门能让工作是扩展的(在唐Jayamanne的Python的)wiki页面。您必须"externalConsole": truelaunch.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"
]

},

python 2022/1/1 18:35:07 有217人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶