Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318910 - [jsdt] breakpoints in project files not hit
Summary: [jsdt] breakpoints in project files not hit
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Simon Kaegi CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 327019
  Show dependency tree
 
Reported: 2010-07-05 11:29 EDT by vlad.balan Mising name CLA
Modified: 2011-05-25 21:01 EDT (History)
4 users (show)

See Also:


Attachments
it'st the breakpoints in the copied versions thar are hit (226.05 KB, image/jpg)
2010-07-05 11:30 EDT, vlad.balan Mising name CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description vlad.balan Mising name CLA 2010-07-05 11:29:46 EDT
Build Identifier: helios for java ee

I see that the "load" command copies any loaded js file in "External
Javascript Source" folder in Project Explorer. Then only the breakpoints set in
these files, not in the original ones in the js projects, are visible. 

So Rhino synchronizes with the breakpoints in these files. Although in the js
debug config you can add projects in the Source tab, projects whose script
breakpoints Rhino should synchronize with.

Excuse me if i'm wrong or a work in progress.

Thank you.

Reproducible: Always

Steps to Reproduce:
To be able to debug i must follow these steps:

1. Setting "Suspend for all script loads" is necessary before the first breakpoints can be set in a script file.
  You have to set this (in the Breakpoints view in the menu that pops-up by clicking on the little arrow besides the Minimize button, on the top right of the view), then you have to load a script in the Rhino console (in the console view) like :
 
Rhino attaching debugger
Start at time: July 5, 2010 4:22:09 PM CEST

Listening to socket on port: 9888

Rhino 1.7 release 2 2009 03 22

js> load("d:/eclipseHelios_workspace/test-js/utils/alerts.js")

2. having set "Suspend for all script loads" suspends the thread before any statement in the script is parsed and this is the moment to go to the Debug view and press F5 to step into the script and suspend at the first statment of the script. This is a hack to make appear the source file that is actually used in the debugging. It is a copy of the original js project file and it apperas in a new project called "External JavaScript Source" that can be seen in the Navigator view for example.

And this is the file where breakpoints can be set. 

3.Set some breakpoint in some function of the file, let's say in function "alfa()". Then call that function(and press Enter) from the Rhino console like:

js> alfa()

You'll see the thread suspended in the Debug view: Thread [Rhino - 1] (suspended loading script: rhino:/stdin). This is because we have set "Suspend for all script loads" and the console is a kind of script (where the users inputs the commands) and you just entered a statement: "alfa()"
Resume by pressing the Resume button in the Debug view or F8.

Then the debugger suspends at the breakpoint you set in function "alfa()".
Comment 1 vlad.balan Mising name CLA 2010-07-05 11:30:29 EDT
Created attachment 173444 [details]
it'st the breakpoints in the copied versions thar are hit
Comment 2 vlad.balan Mising name CLA 2010-07-05 11:34:04 EDT
And to make appear such a breakpoint-aware file I must set "Suspend for all script loads" and use this opprortunity to step-into (F5) the file. This makes the files appears in "External JavaScript Source""