Pramod Gopinath's Weblog

Thursday Nov 09, 2006

Phobos ServerSide Javascript Debugging in Netbeans

Until we have the builds ready these are the steps that would enable Phobos server side Javascript debugging in Netbeans IDE. 

1. Checkout and build a Phobos distribution following the instructions provided at https://phobos.dev.java.net/building.html.

These are the steps that I followed :
    mkdir phobosSrcCode
    cd phobosSrcCode

    cvs -d :pserver:<>@cvs.dev.java.net:/cvs checkout ajax
    cd ajax/ws/jmaki
    ant

    cd ../../../
    cvs -d :pserver:<
>@cvs.dev.java.net:/cvs checkout phobos
    cd phobos/phobos
    ant dist

 
2. From http://www.netbeans.org, download the latest Netbeans 5.5 IDE and install it.


3. Launch netbeans 5.5 IDE and open the phobos project by using
"File"->"Open Project" : Select "<pathTo>phobosSrcCode/phobos/phobos" & click "Open Project Folder" button.

4. Load the required plugins by doing the following :
"File"->"Open Project" : Select "<pathTo>phobosSrcCode/ajax/ide-plugins/netbeans/AJAX-suite" & click "Open Project Folder" button.
"File"->"Open Project" : Select "
<pathTo>phobosSrcCode/phobos/ide-plugins/netbeans-plugins" & click "Open Project Folder" button.


5. Now lets build the required Netbeans projects. For each of the projects that are listed below, you need to click the right mouse and select "Build Project" :

    jMaki Ajax support
    phobos-server
    Phobos Debug Interfaces Library
    Phobos NetBeans plugin
    Phobos Debugger

My recommendation is to build the projects in the same order that I have listed above. Once all these projects are successfully compiled restart Netbeans 5.5 IDE.


6. Then for each of the project that we built in step 5 (again following the same order), we need to right click on them and execute "Install/Reload in Development IDE".


7. Let us install the javascript editor module into netbeans.
Select "Tools"->"Update Center"->"Check the web for Updates".
Ensure that "AJAX Update Center" is selected.
Also check that your proxy information is correct.
Click on "Next" button and from the listbox "AJAX Update Center"->"Select Modules to Install" select "CSSCompletion" and "Javascript Editor".
Click the "Next" button, "Accept" the license and then select both these modules to be installed.
Click "Yes" on the popup dialog box related to "Unsigned Modules".
For these modules to be correctly installed select to "Restart" netbeans.

 
8. Now for netbeans to debug a phobos application we need to setup the phobos environment information in netbeans.
"Tools"->"Options"->"Miscellaneous"->"Phobos Options"-> point to the dist directory of your installation, in my case "<pathTo>phobos_11082006/phobos/phobos/dist"

 
9. Lets create a very simple phobos application and see if we can use the netbeans debugger to debug a javascript file. "File"->"New Project"->"Scripting"->"Phobos Application" - specify the project folder locations.
Lets say that the application that was created was called "PhobosApplication1".

Under "PhobosApplication1"->"Application Directory"->"controller", double click on "main.js".
This file should be opened by the Javascript editor. Now lets place a breakpoint on the line "library.view.render("main.ejs");"

Use "Run"->"Debug Main project" and you should see your breakpoint hit

Comments:

[Trackback] A preview of the Phobos plugins for NetBeans 5.5.

Posted by Roberto Chinnici's Blog on November 10, 2006 at 03:05 PM PST #

fdsfds

Posted by 151.25.98.175 on February 05, 2007 at 10:09 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Calendar

Feeds

Search

Links

Navigation

Referrers