You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bsf-user@jakarta.apache.org by Daling Xu <da...@yahoo.com> on 2007/05/01 14:07:15 UTC

JavaScript Debugger

Hi,
   
  We are planning to use BSF and several scripting languages for our project. We plan to start from JavaScript and continue to start to support other scripting languages in future. 
   
  Is there any good JavaScript Debugger? If possible, we prefer an Eclipse plugin. So far, I researched several: ATF JavaScript Debugger, Venkman, SplineTech JavaScript Debugger. But all of them defaultly assume that it's debugging JavaScript inside a webpage and some even require a HTTP server. That's not true for my project, mine is nothing to do with web.  I also tried Rhino's GUI debugger, but the GUI doesn't look very nice, also it can't be integrated with Eclipse. 
   
  So, anybody here is using JavaScript for serious, non-web development? What kind of debugger did you use? 
   
  If we can't find a JavaScript deubgger satisfy the requirement, any other scripting language debugger available that can debug a standalone script and could be integrated to Eclipse as a plugin?
   
  Thank you very much for any information.
   
  Daling

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

How to run multiple scriptlet files at the same time

Posted by Daling Xu <da...@yahoo.com>.
Hi,
   
  I have asked this question before but couldn't get a working solution, let me try to rephrase my scenario. It's really critical for my project.
   
  I am using BSF to call scriptling code from my java app. Because my business logic is complicated, I would like to separate them into several script files, e.g. main.js, mylib.js.
   
  In mylib.js, I just define some functions that will be called from main.js
   
  In Rhino engine's shell, I can call the two files together by 
  Context.enter();
  Context context = Context.getCurrentContext();
  
  
  ScriptableObject scope1 = context.initStandardObjects();
  context.evaluateReader( scope1, new FileReader("C:\\scriptAgents\\sample2\\mylib.js"), 
  "mylib.js", 1, null); 
  context.evaluateReader( scope1, new FileReader("C:\\scriptAgents\\sample2\\main.js"), 
  "main.js", 1, null);
   
  I tested the code, it runs well.
  
But when I use BSF, my java code can ( and should ) only access BSF's api, which only have one eval() method that takes one file and execute it, so I can't call the main and lib at the same time, and my main.js will actually throw exception of "method not defined" exception.
   
  So is it purposely designed in BSF to execute scriptlet only one at a time? Is it still posibble to enable this capability in BSF?? 
   
  Thanks
   
  Daling

       
---------------------------------
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 

RE: JavaScript Debugger

Posted by "Langley, John" <la...@telcordia.com>.
I'd also be interested in responses as we may have a similar need. 

As far as other debuggers go...

I've looked at the Groovy debugger, and the version that was in
subversion when I last tried it (about 1.5 months ago) was actually
quite good, you could set break points in scripts, trace calls back and
forth between java and the script language (groovy), see variable values
in the script and java. Although there were some rough spots (the
interface point between java and the script language, i.e. calling
between the two levels, was a bit rough) it showed great promise. 

Langley 

-----Original Message-----
From: Daling Xu [mailto:daling_xu@yahoo.com] 
Sent: Tuesday, May 01, 2007 8:07 AM
To: bsf-user@jakarta.apache.org
Subject: JavaScript Debugger 

Hi,
   
  We are planning to use BSF and several scripting languages for our
project. We plan to start from JavaScript and continue to start to
support other scripting languages in future. 
   
  Is there any good JavaScript Debugger? If possible, we prefer an
Eclipse plugin. So far, I researched several: ATF JavaScript Debugger,
Venkman, SplineTech JavaScript Debugger. But all of them defaultly
assume that it's debugging JavaScript inside a webpage and some even
require a HTTP server. That's not true for my project, mine is nothing
to do with web.  I also tried Rhino's GUI debugger, but the GUI doesn't
look very nice, also it can't be integrated with Eclipse. 
   
  So, anybody here is using JavaScript for serious, non-web development?
What kind of debugger did you use? 
   
  If we can't find a JavaScript deubgger satisfy the requirement, any
other scripting language debugger available that can debug a standalone
script and could be integrated to Eclipse as a plugin?
   
  Thank you very much for any information.
   
  Daling

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-user-help@jakarta.apache.org