Debugging the server- and the client-side code
Available only in PyCharm Professional: download to try or compare editions
Required plugins:
Javascript and TypeScript
, JavaScript Debugger
, Node.js
- The plugins are available only in PyCharm Professional, where they are enabled by default.
note
Debugging of JavaScript client-side code is only supported in Google Chrome and in other Chromium-based browsers.
With PyCharm, you can debug the server-side code of a Node.js application together with its client-side JavaScript code. To do that, you need to create a separate JavaScript Debug configuration in addition to the Node.js configuration and run these two configurations together. You can do that in two ways:
Create a JavaScript Debug configuration from the Edit Configurations dialog (Run | Edit Configurations) and then click
to start it. For more information, refer to Debugging an application running on an external web server.
Create a JavaScript Debug configuration from the Live Edit tab when creating or editing a Node.js configuration. In this case, the JavaScript Debug configuration will start automatically every time you start the Node.js configuration.
Go to Run | Edit Configurations. Alternatively, select Edit Configurations from the list on the toolbar.
From the list, select the Node.js run configuration to start together with a JavaScript Debug configuration. In the dialog that opens, switch to the Browser / Live Edit tab.
Select After launch to start a browser automatically when you launch a debugging session.
In the field below, type the URL address to open the application at.
Choose the browser to use from the list next to the After launch checkbox.
To use the system default browser, select Default.
To use a custom browser, select it from the list. Note that debugging of JavaScript client-side code is only supported in Google Chrome and in other Chromium-based browsers.
To configure browsers, click
and adjust the settings in the Web Browsers and Preview dialog that opens. For more information, refer to Configure browsers.
Select the With JavaScript debugger checkbox.
Thanks for your feedback!