前提・実現したいこと
ここに質問の内容を詳しく書いてください。
プログラミング言語初心者です。
授業でC言語を使うことになり、自分のPCでvs codeを使用しています。
コンパイラはMinGW version8.2.0を使用しています。
発生している問題・エラーメッセージ
デバッグを開始してもHello,world!が表示されません。
###エラーメッセージcode
C
1GNU gdb (GDB) 7.6.1 2Copyright (C) 2013 Free Software Foundation, Inc. 3License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 4This is free software: you are free to change and redistribute it. 5There is NO WARRANTY, to the extent permitted by law. Type "show copying" 6and "show warranty" for details. 7This GDB was configured as "mingw32". 8For bug reporting instructions, please see: 9<http://www.gnu.org/software/gdb/bugs/>. 10Warning: Debuggee TargetArchitecture not detected, assuming x86_64. 11=cmd-param-changed,param="pagination",value="off" 12[New Thread 3768.0x2ba4] 13[New Thread 3768.0x1f74] 14The program 'C:\Users\ユーザー\Documents\vscode\test\helloworld.exe' has exited with code 0 (0x00000000). 15
該当のソースコード
C
1include <stdio.h> 2int main(void) 3{ 4 printf("Hello, world!\n"); 5 return 0; 6} 7
###launch.json
C
1{ 2 // IntelliSense を使用して利用可能な属性を学べます。 3 // 既存の属性の説明をホバーして表示します。 4 // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387 5 "version": "0.2.0", 6 "configurations": [ 7 { 8 "name": "(gdb) Launch", 9 "type": "cppdbg", 10 "request": "launch", 11 "program": "${workspaceFolder}/test//helloworld.exe", 12 "args": [], 13 "stopAtEntry": false, 14 "cwd": "${workspaceFolder}", 15 "environment": [], 16 "externalConsole": true, 17 "MIMode": "gdb", 18 "miDebuggerPath": "c:\mingw\bin\gdb.exe", 19 "setupCommands": [ 20 { 21 "description": "Enable pretty-printing for gdb", 22 "text": "-enable-pretty-printing", 23 "ignoreFailures": true 24 } 25 ] 26 } 27 ] 28}
###c_cpp_properties.json
C
1{ 2 "configurations": [ 3 { 4 "name": "Win32", 5 "includePath": [ 6 "${workspaceFolder}", 7 "C:/MinGW/include" 8 ], 9 "defines": [ 10 "_DEBUG", 11 "UNICODE", 12 "_UNICODE" 13 ], 14 "windowsSdkVersion": "10.0.18362.1", 15 "compilerPath": "C:/MinGW/bin/gcc.exe", 16 "cStandard": "c11", 17 "cppStandard": "c++17", 18 "intelliSenseMode": "clang-x64" 19 } 20 ], 21 "version": 4 22} 23
###tasks.json
C
1{ 2 "tasks": [ 3 { 4 "type": "shell", 5 "label": "gcc.exe build active file", 6 "command": "C:\MinGW\bin\gcc.exe", 7 "args": [ 8 "-g", 9 "${file}", 10 "-o", 11 "${fileDirname}\${fileBasenameNoExtension}.exe" 12 ], 13 "options": { 14 "cwd": "C:\MinGW\bin" 15 } 16 } 17 ], 18 "version": "2.0.0" 19}
##試したこと
pathの環境変数は通してあります。
ctrl+F5も試しましたが同様のエラーが発生します。