프로그래밍

VisualStudioCode C++ 디버깅 오류

vlinders 2021. 9. 25. 14:46

VSCode에서 C/C++ 확장을 설치한 뒤 디버깅을 실행했을 때 아래의 에러가 발생했다.

Warning: Debuggee TargetArchitecture not detected, assuming x86_64.

ERROR: Unable to start debugging. Unexpected LLDB output from command "-exec-run". process exited with status -1 (attach failed ((os/kern) invalid argument))

The program '/Users/path~~~/asd.cpp' has exited with code 42 (0x0000002a).

위와 같이 42 코드를 리턴하면서 종료하는 경우엔

lanuch.json의 configurations설정에서 "type": "cppdbg"로 설정돼있던걸 "type": "lldb"로 바꾸면 정상적으로 디버깅이 실행된다.