]
Ilya Buziuk reassigned ERT-342:
-------------------------------
Assignee: Ilya Buziuk
Breakpoints doesn't hit if create Project from existing source.
[EBZ#439778]
----------------------------------------------------------------------------
Key: ERT-342
URL:
https://issues.jboss.org/browse/ERT-342
Project: Eclipse Release Train
Issue Type: Task
Components: JSDT
Reporter: Friendly Jira Robot
Assignee: Ilya Buziuk
Labels: Debug, bzira
Fix For: Neon.1 (4.6)
I created JavaScript project (Name: Sample) using "Create Project from existing
source" Let see in "C:\TestProject" which contains test.js script.
Now i opened test.js and added some breakpoint in that script, now when I'm running
the script breakpoint is Not Hitting.
*****************Investigation********************
org.eclipse.wst.jsdt.debug.internal.core.model.ScriptResolutionManager there is a
function guessScriptMatches(ScriptReference script, IPath path).
JavaDoc of this function: "Guesses if the paths are considered equal by walking
backward from the last segment of the paths and counting the matching segments. The paths
are guessed to be equal iff any two or more segments match in order."
So in My case because Project name and physical folder name are different. That why only
file name is matching, but this function is checking for at least 2 segment to match, so
it returns false and caller function will not add JavaScriptDebugTarget for this script.
******************** Solution Proposal*********************
We can check if current script is inside root folder of project then if one segment
matches we'll return true, for other case it will remain check for at least two
segment to match