Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336041

Summary: Debugging is not happening properly
Product: [Tools] CDT Reporter: GaneshrajS <ganesh-s.raj>
Component: cdt-debug-cdi-gdbAssignee: Project Inbox <cdt-debug-cdi-gdb-inbox>
Status: RESOLVED WONTFIX QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: blocker    
Priority: P3 CC: cdtdoug, ganesh-s.raj, marc.khouzam, pawel.1.piech
Version: 7.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description GaneshrajS CLA 2011-02-02 02:38:46 EST
Hi,

I used sample project(Hello world program which is coming as a template - Make file project) and tried to debug it. I am able to launch the debugger from Eclipse with some issues.

Build id: I20100608-0911
CDT : 7.0.1

Issue 1: After a debug session is started, debugger should use already opened editors if there is any, but now it is opening new editors. So while debugging we get 2 instance of the same editors.

Issue 2: If there is any printf statements stepover should print its output in the console view but it is not happening. It is printed only when we resume the debug session.

Thanks,
Ganeshraj.S
Comment 1 Marc Khouzam CLA 2012-07-19 07:57:00 EDT
(In reply to comment #0)

> Issue 2: If there is any printf statements stepover should print its output in
> the console view but it is not happening. It is printed only when we resume the
> debug session.

You can try one of:
1- adding fflush(stdout) after printf()
2- adding the following lines at the beginning of the program:
 setvbuf(stdout, NULL, _IONBF, 0);
 setvbuf(stderr, NULL, _IONBF, 0);
3- adding the line
  set new-console on
  to a gdbinit file for your launch

See Bug 345029
Comment 2 Jonah Graham CLA 2017-10-23 13:43:49 EDT
(this is part of a batch change)

The CDI debug implementation has been removed in CDT 9.0. Please see bug 484900 and the entry on the New and Noteworthy page https://wiki.eclipse.org/CDT/User/NewIn90#API_modifications