Not able to run code in sublime text on chrome browser ...not able to run as per video

Not able to run code in sublime text editor

Hi @adityapy2409

Can you please elaborate on the error you are facing. you can also share screenshots of code so that we can provide you with a better solution.

Hi @adityapy2409
It will be very helpful for us if you can share a screenshot of your code. Well, here is an alternate answer for you: Try using Visual Studio I hope this will be helpful. Thank you

To run code from Sublime Text in Chrome:

  1. Save your file in Sublime Text with the appropriate extension (e.g., .html or .js).
  2. Open the file location from Sublime Text (Right-click > Open Containing Folder).
  3. Open the file in Chrome by right-clicking the file and choosing “Open with Chrome” or dragging it into an open Chrome window.

For JavaScript:

  • Create an HTML file to include your JavaScript code and open the HTML file in Chrome.

Use Sublime Text plugins like View In Browser via Package Control to streamline this process.

@adityapy2409
(1) Save Your File Correctly: Ensure your HTML file is saved with the .html extension.
(2) Open the HTML File in Chrome: In Sublime Text, right-click on the HTML file tab and select “Open Containing Folder” or “Reveal in Finder” (macOS).
Locate the saved HTML file in your file explorer.
Right-click the HTML file and select “Open with” and then choose “Google Chrome”.

Follow the above steps and check whether it’s working or not.

you can use visual studio code as an alternative ,it is easy to use you just need to type the code after creating a new file with .html extension if it is a html file and .js extension for javascript file and run it i personally prefer visual studio code.

Try using these solutions:

● Integrated Console (Ctrl + B): Sublime Text 3 has an integrated console that runs Python code when you press Ctrl + B. If you’re not seeing any output, make sure you’re using this shortcut. It should display the results in the bottom panel.
● To work around this, consider installing a package like Terminus. It allows you to run your program from a Sublime Text view and provides a terminal-like experience.
● Alternatively, you can try using SublimeREPL to create an interactive environment within Sublime Text.
● If you’re still having issues, consider trying Visual Studio Code (VSCode). It’s similar to Sublime Text and supports interactive code execution.