title: CodeBlocks Debugger Not Working. Error Creating Process (error 2)
body: <p>I installed the gnu gcc compiler for c and when I installed codeblocks everything was working fine except the debugger. The program even compiles and runs but the debugger wont start.</p>
  <p>This is the message in the debugger tab. It ends with error 2.</p>
  <pre><code>Active debugger config: GDB/CDB debugger:Default
  Building to ensure sources are up-to-date
  Selecting target: 
  Debug
  Adding source dir: D:\Projects\LearningC\
  Adding source dir: D:\Projects\LearningC\
  Adding file: D:\Projects\LearningC\bin\Debug\LearningC.exe
  Changing directory to: D:/Projects/LearningC/.
  Set variable: PATH=.;C:\cygwin64\bin;C:\cygwin64;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Users\aayus\AppData\Local\Microsoft\WindowsApps
  
  [debug]Command-line: C:\cygwin64\bin\gdb.exe -nx -fullname -quiet  -args D:/Projects/LearningC/bin/Debug/LearningC.exe
  [debug]Working dir : D:\Projects\LearningC
  
  Starting debugger: C:\cygwin64\bin\gdb.exe -nx -fullname -quiet  -args D:/Projects/LearningC/bin/Debug/LearningC.exe
  done
  
  [debug]Reading symbols from D:/Projects/LearningC/bin/Debug/LearningC.exe...
  [debug](gdb) 
  [debug]&gt; set prompt &gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  
  Setting breakpoints
  
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; show version
  [debug]GNU gdb (GDB) (Cygwin 10.2-1) 10.2
  [debug]Copyright (C) 2021 Free Software Foundation, Inc.
  [debug]License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  [debug]This is free software: you are free to change and redistribute it.
  [debug]There is NO WARRANTY, to the extent permitted by law.
  [debug]Type &quot;show copying&quot; and &quot;show warranty&quot; for details.
  [debug]This GDB was configured as &quot;x86_64-pc-cygwin&quot;.
  [debug]Type &quot;show configuration&quot; for configuration details.
  [debug]For bug reporting instructions, please see:
  [debug]&lt;https://www.gnu.org/software/gdb/bugs/&gt;.
  [debug]Find the GDB manual and other documentation resources online at:
  [debug]    &lt;http://www.gnu.org/software/gdb/documentation/&gt;.
  [debug]For help, type &quot;help&quot;.
  [debug]Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;.
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set confirm off
  
  Debugger name and version: GNU gdb (GDB) (Cygwin 10.2-1) 10.2
  
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set width 0
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set height 0
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set breakpoint pending on
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set print asm-demangle on
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set unwindonsignal on
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set print elements 200
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set new-console on
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; set disassembly-flavor att
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; catch throw
  [debug]Catchpoint 1 (throw)
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; directory D:/Projects/LearningC/
  [debug]Source directories searched: /cygdrive/d/Projects/LearningC/D:/Projects/LearningC:$cdir:$cwd
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  [debug]&gt; run
  [debug]Error creating process /cygdrive/d/Projects/LearningC/D:/Projects/LearningC/bin/Debug/LearningC.exe, (error 2).
  [debug]Starting program: /cygdrive/d/Projects/LearningC/D:/Projects/LearningC/bin/Debug/LearningC.exe 
  [debug]&gt;&gt;&gt;&gt;&gt;&gt;cb_gdb:
  
  Error creating process /cygdrive/d/Projects/LearningC/D:/Projects/LearningC/bin/Debug/LearningC.exe, (error 2).
  
  [debug]&gt; quit
  
  Debugger finished with status 0
  </code></pre>
  <p>It would be really helpful if someone could help me. Its just a simple helloworld program.</p>