Problem: when debugging the programs with lldb-mi on MacOS with VSCode-cpptools, the buildin terminal of VSCode not used as the stdin&out interface.
Fix:
- enable external terminal
- use stdin file while debugging and pass the file path using debugger setup command.
Notes:
- the
"args": ["<", "${fileDirname}/data/${fileBasenameNoExtension}"]
will not work (at least for now) on MacOS because it treats the redirect operator as program argument. - the 1. does work with gdb-mi (on Linux) though.
- if not want to use stdin, just enable the external terminal and in put the data manually during debugging at external terminal window.