Posts Tagged ‘JavaScript’

Lint your JavaScript with JSLint/JSHint in real time

Thursday, May 24th, 2012

This is a cross-post from WebStorm & PhpStorm blog, originally posted by Maxim Mossienko.

Do you have a habit running JSLint or JSHint for your JavaScript code? If you do not have it because the running is tedious, then IDE can help you with it while you edit the code. Here is how.

(more…)

Code Coverage for JavaScript Unit Testing

Tuesday, April 17th, 2012

This is a cross-post from WebStorm & PhpStorm blog, originally posted by Sergey Simonchik.

Measuring JavaScript code coverage naturally complements unit testing. It provides a clear picture of which parts of your code remain untested, and helps you focus additional tests on the uncovered code.

From now on, users of JsTestDriver can measure code coverage visually, right in the editor with JsTestDriver plugin for IntelliJ IDEA. Make sure you have installed 11.1.2 EAP with the latest version of the plugin. (more…)

Easier JavaScript Library Scope Configuration in IntelliJ IDEA 11.1

Thursday, April 5th, 2012

This is a cross-post from WebStorm & PhpStorm blog, originally posted by Konstantin Ulitin.

As you may know from the previous post about JavaScript Libraries in Intellij IDEA 10, the main benefit of specifying JavaScript libraries in your project is to populate a completion list with only relevant members. We have reorganized the configuration panel at Settings|JavaScript|Libraries, so it hopefully become easier to use. (more…)

Smarter JavaScript completion in IntelliJ IDEA 11.1

Wednesday, April 4th, 2012

This is a cross-post from WebStorm & PhpStorm blog, originally posted by Konstantin Ulitin.

We are getting a lot of reports and ideas from you about the ordering of JavaScript completion options. So in IntelliJ IDEA we made small but important improvements. More relevant suggestions now appear at the top of the list in many cases.
(more…)

IntelliJ IDEA 11.1 EAP build 116.108

Wednesday, March 14th, 2012

Probably the last EAP build (before RC) of IntelliJ IDEA 11.1 is available for download.

New settings are added to Groovy Colors & Fonts settings to highlight local variables, parameters, reassigned local variables, reassigned parameters and method declarations in the editor.

This build includes a notable enhancement in JavaScript code completion: the variants are now ordered by “inheritance”. Also worth noting is that editing large CSS files should be significantly better now.

Check the other changes in the release notes.

Your feedback is very important at this point.

New in 11.1: JavaScript.next syntax support

Friday, March 2nd, 2012

This is a cross-post from WebStorm & PhpStorm blog, originally posted by Konstantin Ulitin.

As you may know, there are different versions of the JavaScript language. Each JavaScript engine implementation adds some nice features that others don’t have. To make sure that you only use features suitable for targeted environments, choose the appropriate one in Settings | Javascript.

JavaScript Language version setting

(more…)

New in 11: ‘Mark Object’ action in JavaScript debuggers

Tuesday, November 8th, 2011

Since IntelliJ IDEA 11 the Mark Object action, which was previously available in JVM-based debuggers only, is also supported in JavaScript debuggers for Firefox and Chrome browsers. To mark an object press F11 on the corresponding node in any debugger tree and specify the label:

After that the labeled object will be marked accordingly in all debugger views:

By the way this feature also works in Flex debugger starting from IntelliJ IDEA 10.5.

New in 11: Custom objects presentation in JavaScript debugger

Friday, October 7th, 2011

When you debug JavaScript code in IntelliJ IDEA 11 you can see the most important properties of an object without expanding its node:

By default the ‘id’ and ‘name’ properties are shown for each object but you can add your own properties in Settings | Debugger | JavaScript:

This feature works for both Firefox and Chrome JS debuggers.

Let us know what you think!

IntelliJ IDEA: Debugging JavaScript in Google Chrome

Monday, March 28th, 2011

IntelliJ IDEA 10 allows you to debug JavaScript code running it in Mozilla Firefox. In IntelliJ IDEA 10.5 can choose to debug JavaScript in Google Chrome as well.

Debugger for Chrome supports all features of JavaScript debugger for Firefox, you can set breakpoints, inspect local variables, evaluate expressions and so on:

If you use Chrome for web browsing and want to debug in it simultaneously you can configure IntelliJ IDEA to use a separate Chrome user profile in ‘IDE Settings | Browser | Chrome‘:

To configure the default debugging browser just edit the ‘JavaScript Debug’ configuration under ‘Defaults’ section.

Download IntelliJ IDEA 10.5 EAP, try the new JS debugger and let us know what you think.

Off-topic: debugging JS in FireFox 4 is supported since IntelliJ IDEA 10.0.3.

JavaScript Libraries in Intellij IDEA 10

Friday, November 19th, 2010

Meeting the needs of developers working with JavaScript, Intellij IDEA 10 adds a new feature to allow specifying global JavaScript libraries that can be used across multiple projects. For a particular project you can set a scope for each library by defining files and directories the library is applicable to. If you already have JavaScript files in your project and keep your current settings, code completion and navigation would work as before.

(more…)