View actual HTML DOM
Available only in PyCharm Professional: download to try or compare editions
Required plugins:
Javascript and TypeScript
, JavaScript Debugger
- The plugins are available only in PyCharm Professional, where they are enabled by default.
Live Edit
- Install the plugin on the Settings | Plugins page, tab Marketplace. The plugins are available only in PyCharm Professional.
note
Debugging of JavaScript code is only supported in Google Chrome and in other Chromium-based browsers.
When you are debugging client-side code, the Elements tab of the Debug tool window shows the HTML source code that implements the actual browser page and its HTML DOM structure.
Any changes made to the page through the browser or in the editor are also immediately reflected in the Elements tab.
Currently this functionality is supported only for Google Chrome and only during a debugging session.
Make sure the JavaScript and TypeScript bundled plugin is enabled in the settings. Press CtrlAlt0S to open settings and then select Plugins. Click the Installed tab. In the search field, type JavaScript and TypeScript. For more information about plugins, refer to Managing plugins.
Make sure the JavaScript Debugger bundled plugin is enabled in the settings. Press CtrlAlt0S to open settings and then select Plugins. Click the Installed tab. In the search field, type JavaScript Debugger. For more information about plugins, refer to Managing plugins.
Install and enable the Live Edit plugin on the Settings | Plugins page, tab Marketplace, as described in Installing plugins from JetBrains Marketplace.
Configure the built-in debugger as described in Configuring JavaScript debugger.
To have the changes you make to your HTML, CSS, or JavaScript code immediately shown in the browser without reloading the page, activate the Live Edit functionality. For more information about the live editing functionality, refer to Live Edit in HTML, CSS, and JavaScript.
Learn more from Live Edit in HTML, CSS, and JavaScript.
To start a debugging session, create a run configuration of the type JavaScript Debug and click the Debug button () on the toolbar.
Switch to the Debug tool window and open the Elements tab. The tab consists of two read-only panes.
The Text pane shows the HTML source code of the page that is currently opened in the browser. As soon as any change is made to the page in the browser (e.g. clicking an icon), the code in the pane is updated accordingly.
The Structure pane shows the DOM structure of the HTML code in the Text pane.
The Structure and the Text panes are mutually synchronized. When you click a node in the DOM structure, PyCharm scrolls through the contents of the Text pane. The panes are also synchronized with the browser: as soon as you click a node in the DOM structure or in the Text pane, PyCharm highlights the corresponding element in the browser.
To view a tree of executed scripts, open the Scripts tab.
Thanks for your feedback!