| Summary: | Debugger calls toString() by itself, changing some variables values. | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ricardo Ribeiro <cardao916> |
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | Michael_Rennie, remy.suen |
| Version: | 3.8 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Ricardo Ribeiro
If a user overrides toString that is their choice - the debugger makes the standard call to toString to display object information (if no detail formatters are provided). The idea of cloning objects to avoid something like this would have a very negative impact on performance and memory usage of the debugger. Luckily though there are two things you can do to work around this: 1. don't implement toString to modify your class 2. provide a detail formatter for the details pane, see: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-detail_formatters.htm |