Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT C/C++ Debugger: any way to evaluate expression without adding watchpoint?(Is there an equivalent of GDB's 'p' (print) command that will print the value of an expression without adding a watchpoint?)
CDT C/C++ Debugger: any way to evaluate expression without adding watchpoint? [message #1744201] Fri, 23 September 2016 10:21 Go to next message
Jason Vas Dias is currently offline Jason Vas DiasFriend
Messages: 6
Registered: September 2016
Junior Member
Is there an equivalent of GDB's 'p' (print) command
(or access to the actual 'p' command)
that will print the value of an expression without adding a watchpoint?

[Updated on: Fri, 23 September 2016 10:23]

Report message to a moderator

Re: CDT C/C++ Debugger: any way to evaluate expression without adding watchpoint? [message #1744208 is a reply to message #1744201] Fri, 23 September 2016 11:29 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Yes there are several ways. You can use the Variables view or the Expressions view.
The default debug perspective has a number of debug related views.
You can see what they are with Window --> Show View --> Other --> Debug
http://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.user/reference/views/variables/ref-variables_view.htm?cp=1_4_7_6

A number of these are in the documented in the Java section. Some of them in the CDT section:
http://help.eclipse.org/neon/topic/org.eclipse.cdt.doc.user/reference/cdt_o_dbg_view.htm?cp=7_4_1

index.php/fa/27185/0/
Hovering over a variable in the code will show its value.
The same for a highlighted expression in the code.

You can also issue gdb commands in the gdb console which should magically appear when you begin debugging,
If necessary, it can be selected in the console view from the drop down list named Display Selected Console when you hover over it.

index.php/fa/27188/0/

[Updated on: Fri, 23 September 2016 11:45]

Report message to a moderator

Previous Topic:getting a "syntax error" in the editor, but...
Next Topic:how to display list of commands run by 'Build All' and save output to a file?
Goto Forum:
  


Current Time: Fri Apr 19 21:22:23 GMT 2024

Powered by FUDForum. Page generated in 0.02395 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top