Author Topic: Debugger finished with status 1  (Read 3145 times)

Shaswat2

  • Guest
Debugger finished with status 1
« on: February 28, 2020, 06:47:16 am »
Hello Everyone

Greetings for the Day!

I have been using Codeblock version 17.12 "nosetup" for my work and it worked perfectly until few days back, I am not able to debug my code. At the same time, I am able to build and run my code perfectly without any error.

Here is the log message from Debugger window

Code

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\Shaswat\Documents\codeblock\
Adding source dir: C:\Users\Shaswat\Documents\codeblock\
Adding file: C:\Users\Shaswat\Documents\codeblock\bin\Debug\codeblock.exe
Changing directory to: C:/Users/Shaswat/Documents/codeblock/.
Set variable: PATH=.;C:\Users\Shaswat\Downloads\Setup\codeblocks-17.12mingw-nosetup\MinGW\bin;C:\Users\Shaswat\Downloads\Setup\codeblocks-17.12mingw-nosetup\MinGW;C:\Program Files (x86)\Integrity\ILMClient11\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\LLVM\bin;C:\Program Files (x86)\PuTTY;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\doxygen\bin;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\WinMerge;C:\Program Files\MATLAB\R2018b\bin;C:\Program Files\MATLAB\R2012b\bin;C:\Program Files (x86)\Integrity\Toolkit\mksnt;C:\Program Files\Microsoft Windows Performance Toolkit;C:\Users\Shaswat\AppData\Local\Continuum\anaconda3\New folder;C:\Users\Shaswat\AppData\Local\Continuum\anaconda3\New folder\Library\mingw-w64\bin;C:\Users\Shaswat\AppData\Local\Continuum\anaconda3\New folder\Library\usr\bin;C:\Users\Shaswat\AppData\Local\Continuum\anaconda3\New folder\Library\bin;C:\Users\Shaswat\AppData\Local\Continuum\anaconda3\New folder\Scripts;C:\Users\Shaswat\AppData\Local\Programs\Python\Python37-32\Scripts;C:\Users\Shaswat\AppData\Local\Programs\Python\Python37-32;C:\Users\Shaswat\AppData\Local\Microsoft\WindowsApps;C:\Users\Shaswat\AppData\Local\Programs\Microsoft VS Code\bin

[debug]Command-line: C:\Users\Shaswat\Downloads\Setup\codeblocks-17.12mingw-nosetup\MinGW\gdb32\bin\gdb32.exe -nx -fullname -quiet  -args C:/Users/Shaswat/Documents/codeblock/bin/Debug/codeblock.exe
[debug]Working dir : C:\Users\Shaswat\Documents\codeblock

Starting debugger: C:\Users\Shaswat\Downloads\Setup\codeblocks-17.12mingw-nosetup\MinGW\gdb32\bin\gdb32.exe -nx -fullname -quiet  -args C:/Users/Shaswat/Documents/codeblock/bin/Debug/codeblock.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]  File "C:\Users\Shaswat\AppData\Local\Programs\Python\Python37-32\Lib\site.py", line 177
[debug]    file=sys.stderr)
[debug]        ^
[debug]SyntaxError: invalid syntax

Debugger finished with status 1


What I tried:

1. My executable path is pointing to "gdb32.exe" under Debugger setting.

2. Read couple of questions that reported exactly the same problem, but it did not work out.

3. I enable "full (Debug log option) in debugger option to get to know if any error I can resolve and I observed that under "Setting breakpoint" option, I case see that debug option points to some python file and error reported as file = sys.stderr.

I am not sure if I am pointing to right problem (stated in point 3) but to resolve it (hit and trial method), I created new project but debug failed to start and reported same problem.

Could anyone guide me to resolve this issue.

P.S. I am new to this community so please guide me if I made any mistake and posting this question at right place.

Thanks in advance.


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Debugger finished with status 1
« Reply #1 on: March 05, 2020, 09:40:42 pm »
Here is the log message from Debugger window
Difficult to guess w/ exact version information, but reasons could be that:
- your debugger is too old for Python 3.7 >> use Python 2.7.x instead.
- you refer to python 3.7 for the script but have a different Python in the PATH that gets called instead >> fix your PATH environment
- your PYTHONHOME environment variable does not point to the python of the erroneous script >> fix the PYTHONHOME variable (sometimes also PYTHONPATH or PYTHON_PATH)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ