Viewing Pages with Web Contents
Available only in PyCharm Professional: download to try or compare editions
With PyCharm, you can perform two opposite operations:
Preview the output of your Web application in the browser to check whether the pages are rendered correctly. PyCharm can display a page preview in a browser of your choice or you can switch between several browsers. PyCharm currently supports previews in the following browsers:
Mozilla Firefox
Internet Explorer
Safari
Chrome
Opera
View the HTML source code of a Web page in the PyCharm editor.
You can preview a file with Web contents in a browser. This can be the PyCharm default browser specified in the Web Browsers and Preview section of the IDE settings or the one of your choice.
Call View | Open in Browser from the main menu. The current file opens in the default browser.
With the editor tab having the focus, choose View | Preview file in from the main menu or press AltF2. Then select the desired browser from the list:
Hover over the code to show the browser icons bar, and click the icon that indicates the desired browser:
tip
If you don't want to see the icons toolbar, or would like to see the icons of just those browsers you are interested in, clear the Active checkboxes for the unnecessary browsers in the Web Browsers and Preview section of the IDE settings.
You can open the HTML source code of any Web page in the PyCharm editor.
No matter which programming language was originally used to develop a page (for example, XML or PHP), PyCharm shows the resulting HTML code.
Press CtrlShift0A, type Open Source Code from URL... in the search field, and select the corresponding action from the list.
In the Open URL dialog that opens, specify the URL address of the desired Web page. Type the URL address manually or choose a previously specified one from the list.
Thanks for your feedback!