Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Vidit Shah
Vidit Shah
6,037 Points

how to run in Visual studio Code

How to run Your code is visual studio code HTML and css code I use mac for the following purpose

7 Answers

Vidit Shah
Vidit Shah
6,037 Points

I cant run. Can u please help me me I am using macintosh

Vidit Shah
Vidit Shah
6,037 Points

Visual studio code is just launched my microsoft for Web development

good!

I never used Visual studio. I am mac person. You need to read documentation.

Piotrek Smyda
Piotrek Smyda
3,786 Points

Hey Vidit. Running your html in VS Code is a bit tricky. You need to set up configuration file. Unfortunately I'm on Windows so I don't know if it will work on Mac but this is a solution I'm using. (I guess Cmd is equivalent to Ctrl)

  1. Hit ctrl+shift+p and find Configure Task Runner - open it
  2. In opened tasks.json file change the configuration as follows:

{ "version": "1.0", "command": "explorer", "windows": { "command": "explorer.exe" }, "args": ["index.html"] }

  1. Save and close the file and go back to your html file
  2. Hit ctrl+shift+b to open it in your browser.

I hope you will figure this out on Mac. BR

Vidit Shah
Vidit Shah
6,037 Points

Thank you for your response I tried searching for mac yesterday but i failed. If you have any further suggestions,p;ease let me know

Regards, Vidit

How about using a Grunt or Gulp task to watch and LiveReload to the browser. Take a look at https://github.com/schickling/gulp-webserver for the commands. Hope it helps.

Hi, Try this link it will help you. https://msdn.microsoft.com/en-us/library/ms233809.aspx

:)