Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simultaneous debugging of Java and Javascript within IDE

Is it possibe to launch grails based java web project from within Eclipse or Netbeans IDE and setup breakpoints in both java and javascript sources and be able to debug both?

If so then how?

I understand debugging javascript is normally done using browser based debugger such as firebug for firefox but there are situations for large projects to be able to debug both javascript and java within IDE. In this scenario I think some sort of built-in mainstream browser or its extension is used within the IDE to support that specific browser.

like image 904
Alan McCloud Avatar asked Jun 14 '26 22:06

Alan McCloud


2 Answers

The only time I've seen client-side and server-side code in the same IDE was years ago with MSIE, which used Visual Studio as its Javascript debugging tool. To be honest though, it wasn't a particularly pleasant experience, and also it wasn't integrated with the rest of the project.

Part of the problem with the idea of debugging Javascript in the IDE is that there's no certainty of your JS code all being within your project. eg you could have loaded JQuery from Google's code repository. So your IDE would have to load the Javascript code from the browser, not from the project. Also, some code may have been dynamically generated or even updated at runtime by Ajax calls, so the IDE would need to keep up-to-date with the browser.

When you start to think about it in those terms, you can see that it would be a very difficult task to debug the JS in the IDE. It makes a lot of sense to keep that functionality in the browser.

like image 111
Spudley Avatar answered Jun 16 '26 10:06

Spudley


Yes

Eclipse: http://www.eclipse.org/atf/flash/index4.php

Netbeans: http://netbeans.org/kb/67/web/js-debugger-ug.html

EDIT:

Aptana Studio provided dynamic javascript debugging (eclipse based, plugin version available) http://www.aptana.com/products/studio2

like image 44
Alois Cochard Avatar answered Jun 16 '26 12:06

Alois Cochard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!