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

Bug 315404

Summary: [templates] New template for 'Debugging by writing to console'
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P5 CC: curtis.windatt.public, daniel_megert, darin.eclipse, dchaffiol, kazm, mariot.chauvin, markus.kell.r, Michael_Rennie, robert.munteanu, tomasz.zarna
Version: 3.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Deepak Azad CLA 2010-06-02 10:44:37 EDT
Include a new template for 'Debugging by writing to console'. This template should be available (only?) in the condition editor of a conditional breakpoint - and possibly with pressing ctrl+space in an empty condition editor.

Possible template (PrintToConsole): 
System.out.println("${cursor}");
return false;

Do we have a context to include this template only in the conditional breakpoint editor?
Comment 1 Markus Keller CLA 2010-06-03 06:13:10 EDT
I would create analogons to the existing sysout, syserr, and systrace templates, e.g. debugout, debugerr, debugtrace.

> Do we have a context to include this template only in the conditional
> breakpoint editor?

Not yet.

Keeping this bug in JDT/Text for now, but parts (or maybe all) of the fix will probably go to debug.
Comment 2 Dani Megert CLA 2010-06-04 06:08:19 EDT
>Keeping this bug in JDT/Text for now, but parts (or maybe all) of the fix will
>probably go to debug.
So it is.
Comment 3 Deepak Azad CLA 2010-12-04 07:31:04 EST
The fix is simple once a context for Debug (or Java Debug) templates is in place. See bug 20597 comment 10.
Comment 4 Dani Megert CLA 2011-01-18 05:47:30 EST
(In reply to comment #3)
> The fix is simple once a context for Debug (or Java Debug) templates is in
> place. See bug 20597 comment 10.

There are currently several limitations that prevent us from going ahead with this (e.g. no proposals without prefix, variables not evaluated, template preference page limitations). For now we defer this to be a '3.8 candidate'. Until then, people can simply define the template as normal Java editor template.
Comment 5 Markus Keller CLA 2016-07-25 06:52:10 EDT
The "Create Tracepoint" action from bug 71020 comment 21 will allow to create a tracepoint with less manual steps than new templates would.

*** This bug has been marked as a duplicate of bug 71020 ***