一 现象
VSCode终端模式下无法输入,如下图
二 原因及解决办法
2.1 原因
VSCode设置了以兼容模式运行这个程序
2.2 解决办法
图标——>右键属性——>兼容性选项卡——>兼容模式——勾选去掉
setting.json中配置
{
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"files.associations": {
".ejs": "html"
},
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [
80
],
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": false
},
"dart.debugExternalLibraries": true,
"dart.debugSdkLibraries": false,
"dart.previewLsp": true,
"terminal.integrated.allowMnemonics": true,
"terminal.integrated.cursorBlinking": true,
}