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

Bug 362841

Summary: Show Stack Frame label as Script Name , Function Name and Line Number
Product: [WebTools] JSDT Reporter: Hernan Pepe Petersen <hernanpepe>
Component: DebugAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact: Michael Rennie <Michael_Rennie>
Severity: normal    
Priority: P3 CC: thatnitind
Version: 3.2.5   
Target Milestone: 3.4 M4   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 367806    
Attachments:
Description Flags
proposed fix
none
Function name is empty sometimes
none
updated patch none

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