Author Topic: Getting error 2 when trying to run debug  (Read 2025 times)

Offline wrsmith50

  • Single posting newcomer
  • *
  • Posts: 2
Getting error 2 when trying to run debug
« on: December 11, 2022, 12:24:40 am »
When I attempt to start debug or click step into to debug, I receive the following error:

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\Smith\Computer_Courses\AdventOfCode\AOC2022\AOC02\
Adding source dir: E:\Smith\Computer_Courses\AdventOfCode\AOC2022\AOC02\
Adding file: E:\Smith\Computer_Courses\AdventOfCode\AOC2022\AOC02\bin\Debug\AOC02.exe
Changing directory to: E:/Smith/Computer_Courses/AdventOfCode/AOC2022/AOC02/.
Set variable: PATH=.;C:\cygwin64\bin;C:\cygwin64;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\UnixUtils;C:\Program Files\Calibre2;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\dotnet;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;E:\Program Files\PostgreSQL;C:\Users\willi\AppData\Local\Microsoft\WindowsApps;C:\Users\willi\.dotnet\tools;C:\Users\willi\AppData\Roaming\npm;C:\Program Files (x86)\EaseUS\Todo Backup\bin\x64
Starting debugger: C:\cygwin64\bin\gdb.exe -nx -fullname -quiet  -args E:/Smith/Computer_Courses/AdventOfCode/AOC2022/AOC02/bin/Debug/AOC02.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) (Cygwin 11.2-1) 11.2
Error creating process /cygdrive/e/Smith/Computer_Courses/AdventOfCode/AOC2022/AOC02/E:/Smith/Computer_Courses/AdventOfCode/AOC2022/AOC02/bin/Debug/AOC02.exe, (error 2).
Debugger finished with status 0

For some reason, the debugger is appending the windows directory path (with forward slashes)
   E:/Smith/Computer_Courses/AdventOfCode/AOC2022/AOC02/
to the cygwin directory path
   /cygdrive/e/Smith/Computer_Courses/AdventOfCode/AOC2022/AOC02/

Is there some setting that can alleviate the problem.
I am using Code::Blocks version 20.03 and cygwin version 3.4.1 on Windows10 Pro.
« Last Edit: December 11, 2022, 12:29:28 am by wrsmith50 »