如何解决如何在 macOS big sure (clang) 中的 VSCode 智能感知调试器中使用输入重定向
似乎 VSCode 找不到我尝试重定向为输入的文件。这是我在 launch.json
中使用的设置:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information,visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0","configurations": [
{
"name": "clang++ - Build and debug active file","type": "cppdbg","request": "launch","program": "${fileDirname}/${fileBasenameNoExtension}","args":
[
"<","${workspaceFolder}/in/test.txt"
],"stopAtEntry": false,"cwd": "${workspaceFolder}","environment": [],"externalConsole": true,"MIMode": "lldb","preLaunchTask": "C/C++: clang++ build active file"
}
]
}
这是我在外部控制台上得到的错误:
Last login: Fri Feb 12 14:47:52 on ttys005
/bin/bash -c 'arch -arch x86_64 '/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/darwin-debug' --unix-socket=/tmp/PGhux0 --arch=x86_64 --working-dir '/Users/siavash/Desktop/281p2' --disable-aslr --env='OS_ACTIVITY_DT_MODE=enable' -- '/Users/siavash/Desktop/281p2/project2' '<' '/Users/siavash/Desktop/281p2/in/test.txt' ; echo Process exited with status $? ; exit';exit
siavash@Siavashs-MBP ~ % /bin/bash -c 'arch -arch x86_64 '/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/darwin-debug' --unix-socket=/tmp/PGhux0 --arch=x86_64 --working-dir '/Users/siavash/Desktop/281p2' --disable-aslr --env='OS_ACTIVITY_DT_MODE=enable' -- '/Users/siavash/Desktop/281p2/project2' '<' '/Users/siavash/Desktop/281p2/in/test.txt' ; echo Process exited with status $? ; exit';exit
zsh: no such file or directory: /Users/siavash/Desktop/281p2/in/test.txt ; echo Process exited with status $? ; exit
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
我也尝试了直接地址路径。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。