Bug 343464 - Evaluating a function that throws doesn't show the stacktrace
Summary: Evaluating a function that throws doesn't show the stacktrace
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-20 18:30 EDT by Chris West (Faux) CLA
Modified: 2011-04-20 18:33 EDT (History)
0 users

See Also:


Attachments
Hacky fix for display only (23.57 KB, application/octet-stream)
2011-04-20 18:32 EDT, Chris West (Faux) CLA
no flags Details
Hacky fix for display only without cruft (7.97 KB, application/octet-stream)
2011-04-20 18:33 EDT, Chris West (Faux) CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris West (Faux) CLA 2011-04-20 18:30:57 EDT
Build Identifier: I20110127-2034

Running the Display action (ctrl+shift+d) on a method invocation that throws shows only the class of the exception.

It'd be much more useful to show the stack-trace and the message from the exception.  (These are currently (sometimes) sent to the console.)

This would also be useful in the Inspect action and the Expressions view.

Reproducible: Always

Steps to Reproduce:
1. Have a class that calls a function that throws, e.g.
class Scratch {
  public static void main(String[] args) {
    foo(); // line 3
  }

  private static void foo() {
    throw new RuntimeException();
  }
}

2. Breakpoint line 3 and run.
3. When the debugger is stopped on line 3, highlight foo() and execute Display (ctrl+shift+d).

You'll get:
"Error Evaluating: An exception occurred: java.lang.RuntimeException", instead of a stack-trace.
Comment 1 Chris West (Faux) CLA 2011-04-20 18:32:04 EDT
Created attachment 193764 [details]
Hacky fix for display only
Comment 2 Chris West (Faux) CLA 2011-04-20 18:33:22 EDT
Created attachment 193765 [details]
Hacky fix for display only without cruft

Ooops, dragged along some other outstanding changes there.