• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Setup Visual Studio Code on Mac For Debugging Arduino, WordPress : Part 2

By Abhishek Ghosh October 12, 2017 10:53 am Updated on October 12, 2017

Setup Visual Studio Code on Mac For Debugging Arduino, WordPress : Part 2

Advertisement

This is the second part of our series guide on setup of Visual Studio Code on Mac. The first part of the guide is here. In this guide we have shown to setup WordPress debug setup. Here is part 2 of how to setup Visual Studio Code on Mac for debugging Arduino, WordPress etc and this current webpage is only for final setup for WordPress. If you want to follow our guides, you must only follow our guides – not of someone else ending up messing up the whole setup. We have tested the things many times and at the time of writing the guide we have no error. Microsoft does say the same thing – they do not have error. P

 

Setup Visual Studio Code on Mac For Debugging WordPress

 

We will show you the way which will not create issue with Atom Editor and on Command Line. From the previous guide, you have a composer.json file located at /Users/your-user-name/.composer/composer.json, which is /Users/abhishekghosh/.composer/composer.json for me. If we run a cat on it :

Vim
1
cat /Users/abhishekghosh/.composer/composer.json

We’ll get this output :

Advertisement

---

Vim
1
2
3
4
5
{
    "require": {
        "squizlabs/php_codesniffer": "*"
    }
}

But I need to have that thing here too :

Vim
1
/Users/abhishekghosh/composer.json

So create a composer.json at /Users/your-user-name and copy-paste the content. Which in my case is just easy :

Vim
1
cp /Users/abhishekghosh/.composer/composer.json /Users/abhishekghosh/composer.json

Now run :

Vim
1
2
3
composer update
composer global show
vendor/bin/phpcs --version

There will be no error. Now install WordPress coding standard (which is actually a physical project, also available on Github) :

Vim
1
composer create-project wp-coding-standards/wpcs:dev-master --no-dev

You’ll get this kind of output :

Vim
1
2
3
4
5
6
7
8
9
Created project in /Users/abhishekghosh/wpcs
Loading composer repositories with package information
Updating dependencies
Package operations: 1 install, 0 updates, 0 removals
  - Installing squizlabs/php_codesniffer (3.1.0): Loading from cache
Writing lock file
Generating autoload files
> "vendor/bin/phpcs" --config-set installed_paths ../../..
Using config file: /Users/abhishekghosh/wpcs/vendor/squizlabs/php_codesniffer/CodeSniffer.conf

If you run :

Vim
1
ls -al ~/wpcs/vendor/bin/phpcs

You’ll notice a symlink. Now you’ll add another symlink :

Vim
1
ln -s ~/wpcs/vendor/bin/phpcs /usr/local/bin/phpcs

Add this thing to your ~/.zshrc :

Vim
1
export PATH="/Users/abhishekghosh/wpcs/vendor/bin:$PATH"

Then save the file and reload :

Vim
1
source ~/.zshrc

Now run this command :

Vim
1
vendor/bin/phpcs --config-set installed_paths wpcs

Then run this command :

Vim
1
vendor/bin/phpcs -i

You should receive output like this :

Vim
1
The installed coding standards are MySource, PEAR, PSR1, PSR2, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs, WordPress-Extra and WordPress-VIP

You wanted WordPress, is not it? Now for testing, clone Hello Dolly plugin :

Vim
1
2
cd ~
git clone https://github.com/wp-plugins/hello-dolly.git

Run checking :

Vim
1
vendor/bin/phpcs --standard=WordPress hello-dolly

You’ll get output like this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FILE: /Users/abhishekghosh/hello-dolly/hello.php
--------------------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 15 LINES
--------------------------------------------------------------------------------
  2 | ERROR | [ ] Missing short description in doc comment
  5 | ERROR | [ ] There must be exactly one blank line after the file comment
  6 | ERROR | [ ] Empty line required before block comment
15 | ERROR | [ ] You must use "/**" style comments for a function comment
46 | ERROR | [ ] Inline comments must end in full-stops, exclamation marks, or
    |       |     question marks
49 | ERROR | [ ] Inline comments must end in full-stops, exclamation marks, or
    |       |     question marks
53 | ERROR | [ ] Inline comments must end in full-stops, exclamation marks, or
    |       |     question marks
54 | ERROR | [ ] You must use "/**" style comments for a function comment
56 | ERROR | [ ] Expected next thing to be an escaping function (see Codex for
    |       |     'Data Validation'), not '"<p id='dolly'>$chosen</p>"'
59 | ERROR | [ ] Inline comments must end in full-stops, exclamation marks, or
    |       |     question marks
62 | ERROR | [ ] Inline comments must end in full-stops, exclamation marks, or
    |       |     question marks
63 | ERROR | [ ] You must use "/**" style comments for a function comment
64 | ERROR | [ ] Inline comments must end in full-stops, exclamation marks, or
    |       |     question marks
67 | ERROR | [ ] Expected next thing to be an escaping function (see Codex for
    |       |     'Data Validation'), not '"
    |       |     '
82 | ERROR | [x] A closing tag is not permitted at the end of a PHP file
82 | ERROR | [x] File must end with a newline character
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
 
Time: 758ms; Memory: 8Mb

Now start Visual Studio Code. That PHPCS extension may disturb and need disabling, reload, enabling and reload to function. You need not to modify settings in Visual Studio Code ( to access user settings click Debug icon and hit COMMAND and , ) as by default in PHPCS extension it is set to null, which means default :

Vim
1
https://marketplace.visualstudio.com/items?itemName=ikappas.phpcs

Now if you copy paste that Hello Dolly plugin’s one PHP file on Visual Studio Code and run Debug as PHP, you’ll get huge errors :

Setup Visual Studio Code on Mac For Debugging Arduino WordPress - Part 2

You can install extensions like this :

Vim
1
https://marketplace.visualstudio.com/items?itemName=HvyIndustries.crane

For the above extension you need to access user settings by clicking Debug icon and hitting COMMAND and , search for what they have suggested to change, save and relaunch.

That PHPCS extension may again disturb and need disabling, reload, enabling and reload to function. That error happens as our ZSH itself load very slow and Visual Studio Code expects immediate availability.

Tagged With how to debug in visual studio mac? , setup visual studio code for arduino

This Article Has Been Shared 687 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Setup Visual Studio Code on Mac For Debugging Arduino, WordPress : Part 2

  • Setup Visual Studio Code on Mac For Debugging Arduino, WordPress : Part 1

    Here is How to Setup Visual Studio Code on Mac For Debugging Arduino, WordPress etc Common Things For the iTerm2 + ZSH + Homebrew Users.

  • Virtual Private Server (VPS) Hosting can be a good option for your blog

    Virtual Private Server (VPS) Hosting is becoming more popular as it offers the flexibility of a dedicated server but much lower priced compared to a dedicated server.

  • Dedicated Server Hosting for WordPress Blog : Why and When to think

    Dedicated Server Hosting for WordPress Blog is definitely the best Hosting option. But, the cost of dedicated Server is the limiting factor. Here are the points when you will think for a dedicated host for your WordPress blog.

  • YouTube Video : YouTube Tips and Tricks for Publishers

    YouTube Tips and Tricks for Publishers will help you to create, optimize YouTube videos, get direct backlinks, Traffic to your blog as well as earn money.

  • Hardening WordPress (Nginx, Ubuntu, OpenStack, HP Cloud)

    Hardening WordPress Written on Official WordPress is Pretty Outdated & Useless on 2015. Here is Some Tips For WordPress Running on Nginx on OpenStack.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023
  • What is Vehicular Ad-Hoc Network? January 24, 2023
  • Difference Between Panel Light, COB Light, Track Light January 21, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Setup Visual Studio Code on Mac For Debugging Arduino, WordPress : Part 2," in The Customize Windows, October 12, 2017, January 29, 2023, https://thecustomizewindows.com/2017/10/setup-visual-studio-code-mac-debugging-arduino-wordpress-part-2/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT