How do I open HTML files on a local server by default?

Hi all,

I've used PyCharm for a few years now. In past editions (prior to 2020.1 which I'm using now), at the top of every HTML file there's been a button to open that file on a local server using a browser like Firefox/Chrome/etc.

E.g. if the file was foo.html, it would spawn a local server and open up http://localhost:63342/projectname/foo.html?_ijt=t6qf2kg1b...

However, with 2020.1 I can't seem to do that anymore. My workflow involves automatically uploading files to a remote server, where external networking is disabled. The standard button I used to press now tries to access https://myserver/foo.html . Alternatively, I can hold shift and open the file locally, but this isn't the same thing as spawning a local server -- it just opens file:///foo.html in the browser.

Is there any way to switch to the old behavior in PyCharm 2020.1? Sorry if this is something obvious I'm missing -- I tried searching and couldn't find anything which is why I'm asking here :) . Thanks,

Rowan

 

1 comment
Comment actions Permalink

You must have your deployment server configured as default for your project; default web server URL is used for previewing HTML files in browser/debugging the pages. If you like to use the built-in Pycharm web server instead, make sure to disable using your servers as default: select the server in the list, right-click it and choose Stop using as default

0

Please sign in to leave a comment.