Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ webserv
*.swp
*~
*.bak
.vscode/
.cache/
compile_commands.json
.help_shown.stamp
Expand All @@ -14,4 +13,3 @@ doxy/
lib/
logs/
website/
.idea/
12 changes: 7 additions & 5 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
{
"name": "Linux / macOS",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/include",
"${workspaceFolder}/inc/**",
"${workspaceFolder}/lib/**",
"${workspaceFolder}/lib/doctest/doctest"
],
"defines": [],
"defines": [
"LOGLEVEL=INFO"
],
"cStandard": "c11",
"cppStandard": "c++98",
"intelliSenseMode": "linux-clang-x64",
"compilerPath": "/usr/bin/clang++"
"intelliSenseMode": "linux-gcc-x64",
"compilerPath": "/usr/bin/c++"
Comment on lines +15 to +16
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration is named "Linux / macOS" but uses "linux-gcc-x64" for intelliSenseMode and "/usr/bin/c++" for compilerPath, which are Linux-specific paths. On macOS, the typical compiler path would be different (often using clang). Consider either: (1) creating separate configurations for Linux and macOS, or (2) using more portable settings, or (3) renaming to indicate this is Linux-specific.

Copilot uses AI. Check for mistakes.
}
],
"version": 4
Expand Down
41 changes: 41 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug webserv (config/example.conf)",
"type": "lldb",
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debugger type is hardcoded to "lldb", which is primarily available on macOS and may not be available on all Linux systems. Many Linux developers use "gdb" instead. Consider either: (1) creating separate debug configurations for different platforms, or (2) using "cppdbg" type which works with both gdb and lldb, or (3) documenting that the LLDB VSCode extension needs to be installed.

Copilot uses AI. Check for mistakes.
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [
"config/example.conf"
],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all"
},
{
"name": "Debug webserv (no args)",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all"
},
{
"name": "Debug run_tests",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/run_tests",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make build_tests"
},
{
"name": "Attach to webserv",
"type": "lldb",
"request": "attach",
"program": "${workspaceFolder}/webserv",
"processId": "${command:pickProcess}"
Comment on lines +6 to +38
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debugger type is hardcoded to "lldb", which is primarily available on macOS and may not be available on all Linux systems. Many Linux developers use "gdb" instead. Consider either: (1) creating separate debug configurations for different platforms, or (2) using "cppdbg" type which works with both gdb and lldb, or (3) documenting that the LLDB VSCode extension needs to be installed.

Suggested change
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [
"config/example.conf"
],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all"
},
{
"name": "Debug webserv (no args)",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all"
},
{
"name": "Debug run_tests",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/run_tests",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make build_tests"
},
{
"name": "Attach to webserv",
"type": "lldb",
"request": "attach",
"program": "${workspaceFolder}/webserv",
"processId": "${command:pickProcess}"
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [
"config/example.conf"
],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all",
"MIMode": "gdb",
"miDebuggerPath": "gdb"
},
{
"name": "Debug webserv (no args)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all",
"MIMode": "gdb",
"miDebuggerPath": "gdb"
},
{
"name": "Debug run_tests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/run_tests",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make build_tests",
"MIMode": "gdb",
"miDebuggerPath": "gdb"
},
{
"name": "Attach to webserv",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/webserv",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"miDebuggerPath": "gdb"

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +38
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debugger type is hardcoded to "lldb", which is primarily available on macOS and may not be available on all Linux systems. Many Linux developers use "gdb" instead. Consider either: (1) creating separate debug configurations for different platforms, or (2) using "cppdbg" type which works with both gdb and lldb, or (3) documenting that the LLDB VSCode extension needs to be installed.

Suggested change
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [
"config/example.conf"
],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all"
},
{
"name": "Debug webserv (no args)",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all"
},
{
"name": "Debug run_tests",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/run_tests",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make build_tests"
},
{
"name": "Attach to webserv",
"type": "lldb",
"request": "attach",
"program": "${workspaceFolder}/webserv",
"processId": "${command:pickProcess}"
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [
"config/example.conf"
],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all",
"MIMode": "gdb"
},
{
"name": "Debug webserv (no args)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/webserv",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make all",
"MIMode": "gdb"
},
{
"name": "Debug run_tests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/run_tests",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "make build_tests",
"MIMode": "gdb"
},
{
"name": "Attach to webserv",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/webserv",
"processId": "${command:pickProcess}",
"MIMode": "gdb"

Copilot uses AI. Check for mistakes.
}
]
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"editor.tabSize": 4,
"editor.insertSpaces": false,
"editor.formatOnSave": true,
"C_Cpp.clang_format_fallbackStyle": "file",
"files.associations": {
"*.hpp": "cpp",
"*.h": "cpp",
"*.cpp": "cpp",
"*.tpp": "cpp"
}
}
62 changes: 62 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "make all",
"type": "shell",
"command": "make",
"args": [
"all"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "make clean",
"type": "shell",
"command": "make",
"args": [
"clean"
],
"problemMatcher": []
},
{
"label": "make fclean",
"type": "shell",
"command": "make",
"args": [
"fclean"
],
"problemMatcher": []
},
{
"label": "make re",
"type": "shell",
"command": "make",
"args": [
"re"
],
"group": "build",
"problemMatcher": [
"$gcc"
]
},
{
"label": "make build_tests",
"type": "shell",
"command": "make",
"args": [
"build_tests"
],
"group": "build",
"problemMatcher": [
"$gcc"
]
}
]
}