Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343142 - Unable to debug javascript when custom classes are used
Summary: Unable to debug javascript when custom classes are used
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows 7
: P3 normal with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Michael Rennie CLA
URL:
Whiteboard:
Keywords:
: 345344 358238 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-18 08:28 EDT by Syamkumar C CLA
Modified: 2013-10-10 11:39 EDT (History)
7 users (show)

See Also:


Attachments
zip file contains the java class and javascript file (763 bytes, application/x-zip-compressed)
2011-04-18 08:28 EDT, Syamkumar C CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Syamkumar C CLA 2011-04-18 08:28:05 EDT
Created attachment 193484 [details]
zip file contains the java class and javascript file

I am using Indigo eclipse 3.7 M6 version. When i try to debug javascript file which uses custom java classes using rhino debugger, it is not recognizing these java classes. I have included this project under Source tab of Rhino java script debug configuration. I am attaching the source files.

when i try to debug the java script it is throwing the below exception:

js: "C:\hiddenpath\math.js", line 1: uncaught JavaScript runtime exception: TypeError: [JavaPackage sample.MathUtility] is not a function, it is object.
	at C:\hiddenpath\math.js:1

The same sample I am able to debug from standalone Rhino Debugger (using the class org.mozilla.javascript.tools.debugger.Main).
Comment 1 Michael Rennie CLA 2011-05-10 18:55:36 EDT
*** Bug 345344 has been marked as a duplicate of this bug. ***
Comment 2 Michael Rennie CLA 2011-09-20 10:13:17 EDT
*** Bug 358238 has been marked as a duplicate of this bug. ***
Comment 3 Syamkumar C CLA 2011-11-14 00:33:26 EST
How do I submit patch to this bug. I have changed the source code for UI plug-in of JSDT plugins. How do i submit back to eclipse org?
Comment 4 Michael Rennie CLA 2011-11-14 09:50:26 EST
(In reply to comment #3)
> How do I submit patch to this bug. I have changed the source code for UI
> plug-in of JSDT plugins. How do i submit back to eclipse org?

Create a patch using your preferred method, and simply attach it this the bug report.
Comment 5 Michael Mishalov CLA 2012-06-17 06:20:55 EDT
(In reply to comment #3)
> How do I submit patch to this bug. I have changed the source code for UI
> plug-in of JSDT plugins. How do i submit back to eclipse org?

Hi Syam,

I have the similar issue.
Can you please share your fix?

Tnx in advance!
Comment 6 Marcus Shaw CLA 2013-10-10 11:39:05 EDT
Here is a workaround.  Put your jar into the JRE's 'ext' folder.  You can find it by running this in the JS debugger:

print(java.lang.System.getProperty('java.ext.dirs'));

Don't forget to prefix the path to your Java class with "Packages".  e.g.

var myObj = new Packages.my.package.MyObj();