You use this panel to configure settings that effect the way the IDE provides support for JavaScript when coding or debugging applications.
You can access this panel by choosing Tools > Options from the main menu, clicking the Miscellaneous category and then clicking the JavaScript tab.
You can specify the following settings:
This setting allows you to specify which browsers you intend your applications to work with. By default, the IDE supports all listed browsers. But if for example you have no intention of making your applications work on Internet Explorer 5.5, you can change the Targeted Browsers setting to reflect that.
To specify a targeted browser, select a browser and corresponding version from the available options. Browsers include:
The IDE uses this setting to provide warnings and documentation contained in code completion. For example, trailing commas in initializer lists can cause problems on Internet Explorer. If you are not targeting Internet Explorer, no warnings will display. Similarly, if you try to use a JavaScript method that is unavailable on one or more of your targeted browsers, the IDE notifies you by displaying a warning in the editor. In code completion, a strikethrough line displays on items that are not supported by all browers in your target list.
This setting allows you to specify which version of the JavaScript language you want
the IDE to treate your sources as. For example, in newer versions of JavaScript you
can use the let
keyword in assignments. In older versions of JavaScript
this would be an error (or, depending on the context, a variable name).
To specify a JavaScript version, select an option from the dropdown list. Available versions include 1.0 to 1.8.
This setting can be useful in cases where you have specific files for which you want to use new language features. Or, you may be using JavaScript for server-side logic and need to specify the language version.
You can configure settings for the JavaScript debugger based on the following options:
debugger;
statement into your JavaScript code.EXCEPTION
. The actual message for the
exception is shown in the Console for the current debugging session. For Firefox, exceptions
are listed in the Local Variables window, detailing the output message beneath the Values
column.http://www.foo.com
, the debugger will suspend in the event that the requested
URL is http://www.foo.com?search=34
. This option can be useful if query
strings are dynamically added.You can specify which Firefox profile to use for JavaScript debugging. If left blank, the browser's default profile is used. When using the JavaScript debugger for the first time, the module will then install the NetBeans Firebug extension (an extension to Firebug add-on) to that profile.
To specify a Firefox profile, either enter the full path to the profile file into the text field, or click the Browse button and navigate to the file on your computer.
Specifying a profile for the debugger can be useful for avoiding compatibility issues with future versions of Firefox. The current NetBeans Firefox extension is compatible with Firebug 1.2. If you have a Firebug version greater than 1.2 installed to your default Firefox profile, and if the JavaScript debugger does not behave as expected, you can simply create another Firefox profile and the IDE will install FireBug 1.2 and other required files into this profile without affecting your default one.