获取控制台输入的信息:
修改launch.json文件中的console属性internalConsole(内部控制台)修改为externalTerminal(外部控制台)即可正常获取输入信息,代码如下:
{ "type": "java", "name": "Debug (Launch)-CodeGenerator<demo>", "request": "launch", "cwd": "${workspaceFolder}", "console": "externalTerminal", "stopOnEntry": false, "mainClass": "com.example.demo.mybatis.CodeGenerator", "args": "", "projectName": "demo" }