I'm using Visual Studio Code for different web development. Recently I'm using Drupal 8 to develop new websites. Drupal 8 has some theme file to place some PHP code in it to changes some parts of theming. How can I debug this theme files in Visual Studio Code? I can't place any breakpoints in my code.
If you find yourself here in future, you might want to look at Drupal Configuring for Visual Studio Code available on drupal site docs.
The URL is: https://www.drupal.org/docs/develop/development-tools/configuring-visual-studio-code
It explans in depth how you can configure:
phpcs: provides integration for PHP CodeSniffer (phpcs) code linting.
Debugger for Chrome: is a Microsoft official extension that adds JavaScript debugging support.
PHP DocBlocker: provides auto-complete for PHP docblocks.
Empty Indent: removes indent of empty lines on save.
PHP Debug: provides launch configuration support for XDebug. Requires XDebug.
And most important Editor Settings.
Happy coding
If you want to use Drupal with vscode I suggest you to install VS-code-drupal extension. It makes .module files recognizable as php files.
If you want to debug php code I suggest you to install vscode-php-debug extension. It's a bit tricky to configure, but if you follow the guide you will succeed.
Another useful extension is vscode-code-runner. It runs portions of code for testing it on the fly.
Unfortunately I have not found yet a good extension for php intellisense.
Related
I am new to VS Code. HTMLHint extension shows hints live without a need to run a separate process.
I have used ESLint & JSHint in browser environment (Web or browser extension) and both show hints live.
I installed ESLint extension and it seems that it requires nmp & running a separate process to check the syntax.
Don't they run automatically like HTMLHint or Spell checker extensions?
How can syntax errors and/or suggestions be shown in VS Code?
I am using visual studio code for a while now on different devices, I have installed the following extensions:
vscode-styled-components
Prettier - Code formatter
JavaScript (ES6) code snippets
HTML Snippets
HTML CSS Support
File Utils
ES7 React/Redux/GraphQL/React-Native snippets
advanced-new-file
some of the extensions do not work on my new device like HTML Snippets, even if it is enabled.
I need to know that how to enable all the extensions installed in vscode and Is there any way to manage the new extensions installed
can you enable only HTML Snippets and disable all extensions? If it works, it may have a problem with other extensions.I know different pc its working, but try this.
From time to time the VS Code Output window opens showing me the output of small-ci How do I deactivate this? I don't know what plugin belongs to small-ci.
The plugins that I have currently installed are:
Beautify
Bookmarks
Bracket Pair Colorizer 2
ci-snippets2
Live Server
Live Share
Material Icon Theme
open in browser
PHP Debug
PHP DocBlocker
PHP Intelephense
PHP IntelliSense
PHP IntelliSense for codeigniter
PHP Server
Python
The plugin that is causing this is PHP IntelliSense for codeigniter
I want to use Visual Studio Code as my main IDE, but I want to compile my code with IAR's compiler.
How could I configure VSCode ?
I found this extension but the documentation is too poor.
Yes, the extension politoleo.iar is indeed NOT good.
-> I found a better one (will try it in future by myself):
VSCode plugin: pluyckx.iar-vsc
IAR For Visual Studio Code - Visual Studio Marketplace
Good document
Welcome to IAR-VSC’s documentation! — IAR-VSC 1.2 documentation
doc's Github source: pluyckx/iar-vsc
IAR related official Technical Note
Using Visual Studio Code with IAR Embedded Workbench
Enjoy it !
There are now two official IAR plugins for VSCode which make things much easier:
For building and development: https://marketplace.visualstudio.com/items?itemName=iarsystems.iar-build
For debugging with C-Spy: https://marketplace.visualstudio.com/items?itemName=iarsystems.iar-debug
https://www.iar.com/knowledge/support/technical-notes/general/using-visual-studio-code-with-iar-embedded-workbench/
What I did is setting some environment variables in settings.json;
then in tasks.json I created shell tasks that call the IarBuild.exe & IarIdePm.exe with appropriate values (see the documentation on the command line options)...
So now, I can use VSCode for navigation & editing, but the compilation is done by the EWARM.
The only thing that I haven't figure out yet is how to make C-Spy work from within VSCode...
Currently when I want to debug, I just launch the EWARM and debug from there...
here is a screenshot:Screenshot of settings.json and tasks.json
For this, you can port you project to the custom build system (non iarbuild), e.g. a best choose is the Qbs. The Qbs support a lot of architectures and the toolchains (include IAR, KEIL and so on). In this case you can then use any IDE which support the Qbs, e.g. such as VSCode or QtCreator, and to open your project in any of these IDEs.
Both IDEs support only the GDB debugging, because the C-Spy debuger is a proptietary technology, which has not the public datasheets.
I'm using Visual Studio Code to write my function to fulfil requests from api.ai. I'm new to javascript and would like to have code documentation and help in the IDE when using command completion.
In the documentation of the Visual Studio Code, it mentions 'typings'. I don't know how to find the typings for the actions-on-google package / library.
Where can I find this?
Typings usually have the same name as the package that they are supporting, prefixed with #types/. In case of the Actions on Google SDK, the types can be installed using npm install #types/actions-on-google. This should enable autocomplete for Actions on Google on your project.
Typing are particularly useful if you are using TypeScript in your project, but even with a JavaScript-only project you should get some autocomplete information in Visual Studio Code.