Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: ZCoder on September 15, 2016, 06:00:09 pm

Title: Windows 10 Debugger is not working :(
Post by: ZCoder on September 15, 2016, 06:00:09 pm
Hi. Sorry for my bad English. I can`t debug my code in code::blocks. I place breakpoints in my code and then press the debug/continue button. It opens a window and waits for my inputs. When I write variables and click enter it just exits from the program. When I was using windows 7 it worked but in windows 10 is not working. PLEASE HELP!
Title: Re: Windows 10 Debugger is not working :(
Post by: BlueHazzard on September 15, 2016, 08:53:08 pm
When I was using windows 7 it worked but in windows 10 is not working. PLEASE HELP!
The EXACT same program?

I write variables and click enter it just exits from the program.
is it a valid input?
does it work if you run it without debugger?
Title: Re: Windows 10 Debugger is not working :(
Post by: ZCoder on September 16, 2016, 12:45:50 pm
Yes, I`ve tested the exact same program. and yes I enter a valid input, when I run without debugger it works.
Title: Re: Windows 10 Debugger is not working :(
Post by: rlb on September 16, 2016, 04:42:57 pm
That sounds suspiciously like your code is invoking undefined behaviour somewhere. If so,
a) symptoms are not expected to be consistent between OSes, OS versions, and linking (including debugging) options - or even within them!
b) it may well be impossible to tell where it does so, on this forum, because it's a programming problem, not a Code::Blocks one. You'll need to ask in a more specialised forum, such as StackOverflow.

Sorry.
Title: Re: Windows 10 Debugger is not working :(
Post by: stahta01 on September 16, 2016, 05:49:18 pm
The CB Dev that does debugger stuff; always says to turn on the debugger log and the post the log.

I am NOT a person who uses the debugger; so, can't help you do this steps.
Settings -> Debugger settings
Checkmark "full (debug) log"

CB Version and debugger version is also info they normally want to have.

Tim S.
Title: Re: Windows 10 Debugger is not working :(
Post by: ZCoder on September 16, 2016, 09:34:56 pm
I wrote a simple code to check debug, but this time not worked too. Code:

#include <iostream>
using namespace std;
int a,b;
int main()
{
    cin>>a>>b;
    a=a+b;
    cout<<a<<" "<<b<<endl;
}

When I run it without debugger it works but with debugger when I enter, for example 4 5 , it does nothing, exits from the program.
I think that it is not a programming problem.
Title: Re: Windows 10 Debugger is not working :(
Post by: oBFusCATed on September 17, 2016, 12:36:00 am
The CB Dev that does debugger stuff; always says to turn on the debugger log and the post the log.

I am NOT a person who uses the debugger; so, can't help you do this steps.
Settings -> Debugger settings
Checkmark "full (debug) log"

CB Version and debugger version is also info they normally want to have.

Tim S.
Title: Re: Windows 10 Debugger is not working :(
Post by: ZCoder on September 17, 2016, 11:44:42 am
This is my debugger log.
Title: Re: Windows 10 Debugger is not working :(
Post by: ollydbg on September 17, 2016, 04:09:12 pm
HaHa, you are trying to debug a "release" version of your executable.
See the log:
Quote
Reading symbols from C:\Users\ZCoder\Desktop\C++\for_debug\bin\Release\for_debug.exe...(no debugging symbols found)...done.

You need a "debug" version of your executable.
My guess is "C:\Users\ZCoder\Desktop\C++\for_debug\bin\Debug\for_debug.exe"
Title: Re: Windows 10 Debugger is not working :(
Post by: ZCoder on September 17, 2016, 06:57:01 pm
How can I change this?
Title: Re: Windows 10 Debugger is not working :(
Post by: oBFusCATed on September 17, 2016, 11:06:39 pm
Just switch the target to debug.

See this http://wiki.codeblocks.org/index.php/Debugging_with_Code::Blocks and our manual.
Title: Re: Windows 10 Debugger is not working :(
Post by: ZCoder on September 17, 2016, 11:38:24 pm
Thank you for your help :D! It is fixed now. I changed release to debug as shown in this picture.