0

Hi I have been trying to debug C code on macOS using vscode. I followed all the steps given here https://code.visualstudio.com/docs/cpp/config-clang-mac. but still when I start debugging a terminal windows appears but it shows this and gets stuck:

enter image description here

My tasks.json file on vscode: enter image description here

My launch.json file on vscode: enter image description here

4
  • 1
    Please put the output of a terminal as text not iumages so that we can read it. Also have you installed Xcode and its command line tools - As it is C why not use Xcode for that, it is more integrated than VSC and does more
    – mmmmmm
    Commented Mar 30, 2021 at 20:01
  • @jumpy123 what version of OSX - BigSur? Also there's a problem no working directory (see the output of the launch)?
    – Mr R
    Commented Mar 30, 2021 at 20:56
  • The error working directory doesn't exist seems to be caused by this folder on your Desktop with spaces in its name sp_work/1.3 Linux - Socket in C/tcpServer. Could you close VS Code, rename 1.3 Linux - Socket in C to (for example) 1.3_Linux_-_Socket_in_C, start VS Code, open the project and try again? And please, as mentioned by @mmmmmm, don't paste screenshots of a terminal, but the text within.
    – jaume
    Commented Apr 2, 2021 at 14:36
  • Also note t ha macos is b a sd on BSD and thus system calls differ from Linux. Don't use Linux tutorials on macos as you will get interesting things to debug
    – mmmmmm
    Commented Apr 2, 2021 at 17:52

0

You must log in to answer this question.

Browse other questions tagged .