Skip to content

Instantly share code, notes, and snippets.

@gabrielke
Created October 3, 2021 13:00
Show Gist options
  • Select an option

  • Save gabrielke/7a61fb379d3bb061a8986859bc314a6d to your computer and use it in GitHub Desktop.

Select an option

Save gabrielke/7a61fb379d3bb061a8986859bc314a6d to your computer and use it in GitHub Desktop.
Visual Studio Code C99 development on Mac M1
{
// 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": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "clang build active file"
}
]
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "clang build active file",
"command": "/usr/bin/clang",
"args": [
"-std=c99",
"-target",
"x86_64-apple-darwin20",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
@mosmar99
Copy link

Thank you so much! I've tried to get the lldb debugger to work for my university classes but all failed until now. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment