From 31e53366b193d133b8b82dd4c3cac0505316d046 Mon Sep 17 00:00:00 2001 From: pvtrx Date: Sat, 1 Nov 2025 13:37:03 +0100 Subject: [PATCH] Entered Test123 file and fixed launch and task.json --- Start_Windows/.vscode/launch.json | 18 +++++++++++ Start_Windows/.vscode/tasks.json | 50 +++++++++++++++++++++++++++++++ Start_Windows/Test123.c | 16 ++++++++++ 3 files changed, 84 insertions(+) create mode 100644 Start_Windows/.vscode/launch.json create mode 100644 Start_Windows/.vscode/tasks.json create mode 100644 Start_Windows/Test123.c diff --git a/Start_Windows/.vscode/launch.json b/Start_Windows/.vscode/launch.json new file mode 100644 index 0000000..45a2b40 --- /dev/null +++ b/Start_Windows/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug current C file", + "type": "cppdbg", + "request": "launch", + "program": "${fileDirname}\\${fileBasenameNoExtension}.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${fileDirname}", + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe", + "preLaunchTask": "C/C++: gcc.exe build active file" + } + ] +} diff --git a/Start_Windows/.vscode/tasks.json b/Start_Windows/.vscode/tasks.json new file mode 100644 index 0000000..52ad522 --- /dev/null +++ b/Start_Windows/.vscode/tasks.json @@ -0,0 +1,50 @@ + +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build C file", + "type": "shell", + "command": "gcc", + "args": [ + "-g", + "${fileBasename}", + "-o", + "${fileBasenameNoExtension}.exe" + ], + "options": { + "cwd": "${fileDirname}" + }, + "group": { + "kind": "build", + "isDefault": false + }, + "problemMatcher": [ + "$gcc" + ] + }, + { + "type": "cppbuild", + "label": "C/C++: gcc.exe build active file", + "command": "C:\\msys64\\mingw64\\bin\\gcc.exe", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}\\${fileBasenameNoExtension}.exe" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ] +} diff --git a/Start_Windows/Test123.c b/Start_Windows/Test123.c new file mode 100644 index 0000000..030517f --- /dev/null +++ b/Start_Windows/Test123.c @@ -0,0 +1,16 @@ +#include +#include + +int i = 10; +double d = 20.5; + + +int main(void) { +while (i < d) { + printf("i: %d, d: %.2f\n", i, d); + i += 2; + d -= 1.5; +} + +return 0; +} \ No newline at end of file