This feature is only supported in the Ultimate edition.
Debugging JavaScript in IntelliJ IDEA is supported through the JavaScript Debugger plugin. The plugin is activated by default. If the plugin is disabled, enable it on the Plugins Settings page as described in Enabling and Disabling Plugins.
Debugging of JavaScript code is supported in Google Chrome
and other browsers of the Chrome family.
During a debugging session, IntelliJ IDEA considers any injected JavaScript code in a web page opened in the browser as subject for debugging. This means that you cannot use one single instance of a browser for browsing and for debugging at the same time. For Google Chrome you can solve this problem by configuring IntelliJ IDEA to use a separate Chrome user profile for debugging.
To ensure successful debugging, it is enough to specify the built-in web server port and accept the default settings that IntelliJ IDEA suggests for other debugger options.
To set the built-in web server port
- In the Settings/Preferences dialog (⌘,⌘,⌘,⌥F7⌃⌥S), click Debugger under Build, Execution, Deployment. The Debugger page opens.
-
In the Built-in server area,
specify the port where the built-in web server runs so the JetBrains Chrome extension can connect through it.
By default this port is set to the default IntelliJ IDEA port
63342through which IntelliJ IDEA accepts connections from services. You can set the port number to any other value starting with 1024 and higher.
Optionally
- Suppress calls to the files on the built-in server from other computers or from outside IntelliJ IDEA by clearing the Can accept external connections or Allow unsigned requests checkbox respectively.
- Choose the way to remove breakpoints, the default setting is Click.
- On the Data Views page under the Debugger node, configure advanced debugger options: enable or disable Inline Debugging, specify when you want to see tooltips with object values and expressions evaluation results, etc.
-
Click JavaScript under the Data Views node and
on the JavaScript page that opens, specify the following:
- Whether you want object node properties to be shown. If so, specify the properties.
Use
and
to manage the list of properties.
- Whether you want object node properties to be shown. If so, specify the properties.
Use