On this page:
- Before you start
- Configuring the Live Edit update policy in the debugging mode
- Live Editing during a debugging session
and even without leaving PyCharm. All the changes you make are immediately reflected in the browser and the affected area is highlighted.
You just need to specify the URL of the page in the
The live contents of the page being edited are shown in the
Elements tab of the Debug tool window.
Before you start
- Install and enable the LiveEdit plugin. The plugin is not bundled with PyCharm, but it can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.
Make sure the JetBrains Chrome Extension is installed in your Chrome browser.
The extension is installed when you first initiate a debugging session and follow the dedicated link provided by PyCharm. For details, see Using JetBrains Chrome Extension.
Configuring the Live Edit update policy in the debugging mode
In the debugging mode, PyCharm provides the Live Edit functionality which supports both automatic and manual upload of updated files on the server side. For the client side, Live Edit does not provide any way to apply the changes.
To configure the Live Edit update policy in the debugging mode
- Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing for Windows and Linux or for OS X. Expand the Debugger node under Build, Execution, Deployment, and then click Live Edit. The Live Edit page opens.
In the Update area,
configure the way changes made to the code during a debugging session are applied.
Note that an update will now be performed only if none of the modified files have any syntax errors.
- Auto in (ms): Choose this option to have the changes applied automatically at certain time interval and specify the delay in ms in the text box. This policy is not available for the client-side code of Meteor applications.
Restart if hotswap fails:
- Select this check box to have PyCharm try restarting the server if the changes cannot be applied automatically. After the restart, PyCharm brings you to the execution point where the problem took place.
- When the check box is cleared, PyCharm just displays a pop-up window informing you about the failure and suggesting you to restart the server manually.
Live Editing during a debugging session
To perform Live Editing during a debugging session
- When editing the code and monitoring how the changes are rendered in the browser, it is helpful to have the areas affected by the changes highlighted. To enable highlighting affected areas, open the PyCharm settings dialog box, click Live Edit, and then select the Highlight current element in browser check box on the Live Edit page that opens.
- Edit the HTML file that implements the page opened in the browser and view the changes immediately rendered.
PyCharm supports an operation that is somehow opposite to live editing. During a debugging session, the Elements tab of the Debug tool window shows the HTML source code that implements the actual browser page and its HTML DOM structure. Moreover, any changes made to the page through the browser are immediately reflected in the Elements tab. For more details, see Viewing Actual HTML DOM.