Skip to content

Instantly share code, notes, and snippets.

@GlaceCoding
Last active April 5, 2023 21:27
Show Gist options
  • Save GlaceCoding/e0195d34145c8837cf8f18264fdd2539 to your computer and use it in GitHub Desktop.
Save GlaceCoding/e0195d34145c8837cf8f18264fdd2539 to your computer and use it in GitHub Desktop.
config VSCode / launch.json&tasks.json, you just need to change the line 13 and 14 of 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": "C Launch",
"type": "cppdbg",
"request": "launch",
"preLaunchTask": "build_debug",
// Change the two lines below
"program": "${workspaceFolder}/pipex_debug",
"args": ["guillaume.txt", "ls", "wc", ".tmp_out_pipex"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "lldb",
"environment": [
{ "name": "PATH", "value": "/usr/local/bin:/usar/bin:/bin:/usr/sbin:/sbin" }
],
"showDisplayString": true
}
]
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "build_debug",
"command": "make",
"args": [
"debug"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"panel": "shared"
}
}
]
}
# ...
$(NAME): $(OBJS) $(HDEPS)
$(CC) $(CFLAGS) -o $(NAME) $(COMPILEFLAGS) $(OBJS)
# Usage: make debug && lldb philo_debug -o run
$(NAME)_debug: $(SRCS) $(HDEPS)
$(CC) $(CFLAGS) -g -o $(NAME)_debug -I$(HEAD) $(COMPILEFLAGS) $(SRCS)
debug: $(NAME)_debug
.PHONY: debug
@GlaceCoding
Copy link
Author

Screenshot 2022-01-26 at 19 30 53
Screenshot 2022-01-26 at 19 33 17

@GlaceCoding
Copy link
Author

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