daton's mac
  • Introduction
  • Hackintosh
    • Requirements
    • Prepare USB Drive
    • Install OSX
    • Post installation
    • WiFi and Bluetooth PCI device
    • System Updates
    • Keyboard Mapping
    • Troubleshooting
  • Windows with WSL
    • Setup for Node.js
    • LinuxBrew
    • Powershell
    • WSL bash and zsh
  • Xcode
  • Homebrew
  • iTerm2
    • Plugins
  • Gifox
  • Node.js
    • Webpack
  • VS Code
  • SSH
  • Git
  • GitKraken
  • Docker
    • Remove Docker things
    • Env vars
    • Frequently used commands
  • Docker on Windows
  • MongoDB
  • Postgres
  • Sentry
  • Redis
  • Ghostscript and Imagemagick
  • Codeanywhere
  • Terraform
  • Kubernetes
    • Helm
    • Docker Desktop for Mac
    • Kubernetes on DigitalOcean
    • K8S with Traefik as IC
    • Kubernetes managed by StackPointCloud
    • Use Docker Images from Private Registry
    • Use a minikube locally
  • Web Apps
  • IoT
  • NVIDIA
Powered by GitBook
On this page
  • Installation
  • Installation of useful extensions
  • Installation of a Font
  • Debug Front-end Application with Chrome Debugging for VS Code
  • To get started
  • Supported features
  • Configuration
  • Executing the Debugger
  • Troubleshootings
  • More resources

VS Code

PreviousWebpackNextSSH

Last updated 5 years ago

Installation

You can get Visual Studio Code from his . Once downloaded, drag and drop the application file into your Applications folder.

Instead of downloading and installing VSCode manually, you can use Homebrew brew cask install visual-studio-code

Installation of useful extensions

Enable the VSCode CLI opening VSCode and click CMD + Shift + P to open the command tool and type: Install command

Now open a terminal window and type:

code --install-extension EditorConfig.EditorConfig
code --install-extension codezombiech.gitignore
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension steoates.autoimport
code --install-extension wix.vscode-import-cost
code --install-extension robertohuertasm.vscode-icons
code --install-extension dustinsanders.an-old-hope-theme-vscode

Installation of a Font

// Place your settings in this file to overwrite the default settings
{
    "editor.fontFamily": "Fira Code",
    "editor.fontLigatures": true,
    "vscode_custom_css.imports": ["file:///Users/daton/Desktop/styles.css"]
}

Replace your User from the path of custom css import.

Debug Front-end Application with Chrome Debugging for VS Code

Chrome Debugger allows front-end developers to debug their client-side JavaScript code running inside Google Chrome directly from Visual Studio Code.

To get started

Supported features

Support for the following features:

  • Setting breakpoints, including within source files when source maps are enabled

  • TypeScript, via source maps

  • Stepping, including using the buttons on the Chrome page

  • Locals scope variables via the VS Code Locals pane

  • Debugging eval scripts, script tags, and scripts that are added dynamically

  • Watches via the VS Code Watch panel.

  • The debug console

  • Most console APIs

Configuration

Press Cmd + Shift + P to open the VS Code command prompt and type launch and Open launch.json and then select Chrome environment:

If your Front-end application run on port 3000 you can use the following configuration:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
       {
           "type": "chrome",
           "request": "launch",
           "name": "Launch Chrome against Localhost on port 3000",
           "url": "http://localhost:3000",
           "webRoot": "${workspaceFolder}/client/src"
       }
}

Set the webRoot folder with the proper path.

Executing the Debugger

Create a Breakpoint in you source code.

Press Cmd + Shift + D to open the Debug Sidenav. On the top left of VS Code we'll find the Play Button with Launch Chrome against Localhost...

A new Chrome window with debugger mode enabled will appear on our screen.

Troubleshootings

If you notice that your system is not able to watch file changes in a large workspace, check this out:

More resources

We are following the article

Download and install both and (or another cursive alternative if you want)

Install VSCode Extension:

Save on your desktop

Update the User settings () in VSCode. (note: don’t forget to change the path “ vscode_custom_css.imports”)

To get started, open the Extensions view (⇧⌘X). When the extension list appears, type 'chrome' to filter the list and install the Debugger for Chrome extension. You'll then create a launch-configuration file which is explained in detail in the README .

You can either setup VS Code to connect to an already running Chrome instance or simply start a new one with remote debugging enabled, but read more about that in our .

Multiple Fonts: Alternative to Operator Mono in VSCode
FiraCode
FlottFlott
Custom CSS and JS Loader
styles.css
settings.json
right here
README
official site
https://code.visualstudio.com/blogs/2016/02/23/introducing-chrome-debugger-for-vs-code?WT.mc_id=vscodecandothat-dotcom-teamcode.visualstudio.com
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospccode.visualstudio.com
VS Code Can Do That?
Logo
The result should look like this.