Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362841 - Show Stack Frame label as Script Name , Function Name and Line Number
Summary: Show Stack Frame label as Script Name , Function Name and Line Number
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: 3.2.5   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Michael Rennie CLA
QA Contact: Michael Rennie CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 367806
  Show dependency tree
 
Reported: 2011-11-03 16:38 EDT by Hernan Pepe Petersen CLA
Modified: 2012-01-03 19:45 EST (History)
1 user (show)

See Also:


Attachments
proposed fix (3.03 KB, patch)
2011-11-03 16:41 EDT, Michael Rennie CLA
no flags Details | Diff
Function name is empty sometimes (173.25 KB, image/jpeg)
2011-11-07 11:08 EST, Hernan Pepe Petersen CLA
no flags Details
updated patch (4.54 KB, patch)
2011-11-07 11:50 EST, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hernan Pepe Petersen CLA 2011-11-03 16:38:20 EDT
Build Identifier: 

Show Stack Frame label as Script Name , Function Name and Line Number when thread is suspended in the debug tab. Debug perspective.

Reproducible: Always
Comment 1 Michael Rennie CLA 2011-11-03 16:41:25 EDT
Created attachment 206433 [details]
proposed fix

I agree that just the full URI of the script and the line number are not good enough. The patch changes the current display to:

<script_name> <func_name>() line:<line_#>

i.e.

myscript.js toString() line: 23
Comment 2 Hernan Pepe Petersen CLA 2011-11-07 11:08:32 EST
Created attachment 206531 [details]
Function name is empty sometimes

I'm having the following issue. Sometimes I get the function name as an empty String from the Chrome browser stack. This code is adding an empty "()" and it doesn't look good. Any ideas for fixing this?
Comment 3 Michael Rennie CLA 2011-11-07 11:38:04 EST
(In reply to comment #2)
 
> Any ideas for fixing this?

We could check to see if the function name is null or empty, and if so just display  <script_name> line: <line_#>

e.g. mypage.htm line: 23
Comment 4 Michael Rennie CLA 2011-11-07 11:50:09 EST
Created attachment 206535 [details]
updated patch

This patch performs the checks mentioned in the previous comment
Comment 5 Hernan Pepe Petersen CLA 2011-11-07 12:16:11 EST
Works perfectly, Thanks.
Comment 6 Michael Rennie CLA 2011-11-15 15:28:07 EST
Applied patch to HEAD