Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Debugging using crossfire(Javascript remote debugging)
Debugging using crossfire [message #812509] Sat, 03 March 2012 18:28 Go to next message
John Brinnand is currently offline John Brinnand
Messages: 5
Registered: March 2012
Junior Member
Hi Folks,

The question is: how does debugging a html with (JS) page work using jsdt? Here is what I have done: added crossfire to firefox; started the crossfire server on port 5000; created a remote javascript configuration in eclipse to connect to the crossfire server; activated it in debug mode; watched the progress bar run to the end without errors. What should be the next steps? I am familiar with JDT and this has similar behavior. But with JDT I can trigger the breakpoints by sending some request to the server. So - following the same paradigm, I refreshed the browser. (Note: break points were set in the JS code). Still no joy.

So - I am left wondering - did the remote connection work and if it did what should happen next? How can I start debugging the html page with it's embedded JS? Am I missing some packages (I am on eclipse indigo with WTP) or missed a step somewhere?

Any help would be greatly appreciated.

Thanks,

John

Re: Debugging using crossfire [message #812536 is a reply to message #812509] Sat, 03 March 2012 19:25 Go to previous messageGo to next message
John Brinnand is currently offline John Brinnand
Messages: 5
Registered: March 2012
Junior Member
P.S. I am very familiar with debugging using firebug. However, the use case of driving the browser from an IDE and an integrated debugging environment (such as what JSDT is moving toward), is much to be desired. If only there was more documentation to help out.
Re: Debugging using crossfire [message #812564 is a reply to message #812536] Sat, 03 March 2012 20:19 Go to previous messageGo to next message
John Brinnand is currently offline John Brinnand
Messages: 5
Registered: March 2012
Junior Member
Folks,

One last thought. It really looks like Indigo's JSDT project is not ready for external users. It doesn't connect to crossfire-0.3a10. It fails with the following error: "Error occurred while launching Did not get correct CrossFire handshake:".

The errors are show stoppers. What are we missing?

John
Re: Debugging using crossfire [message #813708 is a reply to message #812564] Mon, 05 March 2012 11:22 Go to previous message
John Brinnand is currently offline John Brinnand
Messages: 5
Registered: March 2012
Junior Member
So - the reason why things didn't work is that when creating a launch configuration, in eclipse, for remote javascript debugging, the debugger must not be attached to any one js or html file. Instead - create the launch configuration and start the debugger without associating it with any one file. My launch configuration is attached as eclipse-indigo-crossfire-attach.png. When attempting to attach to the crossfire server, it helps to switch to the debug mode. In this mode, you can see when the connection has been made. (See attached image: eclipse-debug-crossfire.png).

Once the connection to crossfire has been made, open the file (js, html) that is loaded into firefox, and set your breakpoints. To kickstart the whole thing, refresh your browser and after a small pause, context will switch to eclipse and you can step through your code in eclipse.

Of course this means that you have firefox with the latest firebug version and the latest crossfire version. (Sadly - I cannot add the links because of a forum rule about posting 25 msgs prior to adding links). Note that once installed you won't see the crossfire icon because it's cleverly hidden in the add-on bar at the bottom of the firefox. To open the add-on bar, go to View->Toolbars->Add-On Bar (see attached image firefox-open-addon-bar.png). Turn it on if it is not already on. The crossfire icon should appear in your add on bar (see attached image crossfire-icon.png). Clicking on this icon will open a dialog asking you to start the crossfire server. To validate the crossfire is running, open firebug (if you haven't already) and click on the Remote tab and you should see the crossfire icon with a message stating that it accepts connections(see attached crossfire-start-server.png image)


I hope this helps anyone trying to get this started.

Regards,

John

Previous Topic:problem to find tag
Next Topic:Exception occurred during code generation for wsdl
Goto Forum:
  


Current Time: Wed Aug 27 23:27:09 EDT 2014

Powered by FUDForum. Page generated in 0.03711 seconds