Author Topic: Debugging breaks on breakpoint but resumes after a few seconds  (Read 428 times)

Offline ingarpedersen

  • Single posting newcomer
  • *
  • Posts: 2
Hi,

I'm trying to debug a multithreaded application, and the debugger reaches a breakpoint and breaks. Then, without any interaction, the debugger suddenly resumes (I can see the output in the terminal window), but there is no output from the debugger in the Debugger windows in CB about continuing or similar. The delay from breaking until it resumes by itself is 3-10 seconds.

I'm running CodeBlocks 13.12 on Raspian, gdb is 7.7.1.
I have tried adding the "set scheduler-locking on" command to the gdb commands, but nothing changes.

After my first breakpoint I have another breakpoint a few lines further down in the code, but when it resumes by itself the other breakpoint is ignored even though there is no other code path.

Any ideas about what is going on here??

Thanks,
Ingar

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10398
Re: Debugging breaks on breakpoint but resumes after a few seconds
« Reply #1 on: August 02, 2017, 02:06:45 pm »
Can you post a full log from the debugger?
What happens if you try the same thing, but using command line gdb?
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ingarpedersen

  • Single posting newcomer
  • *
  • Posts: 2
Re: Debugging breaks on breakpoint but resumes after a few seconds
« Reply #2 on: August 03, 2017, 12:34:14 pm »
How do I get a full log from the debugger when using CB?
I'm not very faimilar with command line gdb, but I'll give it a try...

Thanks,
Ingar

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1581
Re: Debugging breaks on breakpoint but resumes after a few seconds
« Reply #3 on: August 03, 2017, 06:17:32 pm »
Settings->Debugger->Common->Enable Full (debug) log
and then copy and paste the text from the Debugger log tab at the bottom. Please use code tags (# symbol in the forum editor) to post the log, because it is a lot text).

 Thank you!

Offline sohorab.sajib

  • Single posting newcomer
  • *
  • Posts: 1
open a new empty file it show me the modify main.c file. how can I do it?
« Reply #4 on: August 03, 2017, 06:53:29 pm »
Hi,
I am new user. My IDE codeblocks 16.01
I want to save time for typing.
like this
"
#include<stdio.h>
int main()
{
  return 0;
}
"
this show me when I open a new empty file(ctrl+shift+n).

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1581
Re: Debugging breaks on breakpoint but resumes after a few seconds
« Reply #5 on: August 04, 2017, 05:02:28 pm »
Why do you hitch hack a other thread? Create a new one if you have a new question...
1) Codeblocks is not made to create multiple main in one project, so i would recommend to use separate projects for every main, so have this code as default
2) You can create a abbreviation with: Settings->Editor->abbreviation->Add (bottom left)-> enter "main"->on the right side type your code
    2.1) Create the new file and type "main". Hit ctrl+j
3) Use the default code: settings->editor->default code

@admin: can you move this to a new thread?