-
Notifications
You must be signed in to change notification settings - Fork 52
Debugging tern.js with Nodeclipse
paulvi edited this page Dec 8, 2014
·
10 revisions
When you develop a JavaScript tern plugin you can debug it with breakpoints by using :
- Web Browser tooling like Chrome Developer Tools. It works great but some tern plugin can works only with node.js like Closure Library
- To debug tern plugin which works only with node.js, you can use Nodeclipse
This section explains step by step how to debug with breakpoints RequireJS tern plugin with Nodeclipse
Note that the procedure is a litlle complex and not perfect and should be improved.
- Install Nodeclipse
- Install tern.java >= 0.4.0
- Create a simple project
- Convert the project to tern
- Select Closure Library in the property page Tern -> Modules
In the global preferences Tern -> Node.js, select Remote access with 1234 port.
- Create a Nodeclipse project that you can name with tern
- Go to your eclipse/plugins folder and copy/paste the content of the node_modules of tern.core plugin
- Rename tern\bin\tern to tern\bin\tern.js
- Select tern\bin\tern.js and open the contextual menu with Debug As -> Node Application
- Stop the debug.
- Edit the launch which has be created :
- Program arguments: --port 1234
- Working Directory: ${workspace_loc:/test-requirejs}
- Restart the debug
- Open tern\plugin\requirejs.js
- set a breakpoint after infer.registerFunction("requireJS"
- go the the sample project and type require and Ctrl+Space
It calls tern.js server and breakpoint is executed.
- Tern IDE
- Tern Toolings
-
Tern Modules
- AngularJS
- AlloyUI
- Browser
- Bootstrap
- CKEditor
- CordovaJS
- Dojo Toolkit
- ECMAScript
- ExtJS
- Game
- jQuery
- JSDoc Support
- Liferay
- Meteor
- Node.js
- Qooxdoo
- snabbt.js
- RequireJS
- Tabris.js
- three.js
- Titanium
- YUI Library
- Completion
- Linter (Validator)
- Tests
- JavaScript Build
- New and Noteworthy