Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315404 - [templates] New template for 'Debugging by writing to console'
Summary: [templates] New template for 'Debugging by writing to console'
Status: CLOSED DUPLICATE of bug 71020
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 10:44 EDT by Deepak Azad CLA
Modified: 2016-07-25 06:52 EDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***