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?
Related
I'm new to contribute to vscode and began to improve some small bug in VSCode builtin extension, markdown-language-features.
when setting breakpoints in TypeScript file (like activeLineMarker.ts
in vscode/extensions/markdown-language-features/preview-src/ or activeLineMarker.js in out directory), the breakpoint become unbound when start debugging.
unbound breakpoint pop-up window
Is there any way or configuration to debug with step-by-step line execution with breakpoints for developping extensions?
The developping environment is just created recently with the official procedure.
Code OSS is successfully launched with Start Debugging (F5) and I can see changes when modifying sources.
The official document says;
The extension host process runs code implemented by a plugin. To debug extensions (including those packaged with VS Code) which run in the extension host process, you can use VS Code itself. Switch to the Debug viewlet, choose the Attach to Extension Host configuration, and press F5.
and doing so results in nothing happening (the debugging seems to want to start but fails, maybe time-out).
After building, there is sourcemap file like activeLineMarker.js.map in out directory.
I have the latest Visual Studio Code.
I have installed the latest SuiteCloud Extension for VS Code.
There is no intellisense.
I have also installed the SuiteNippets extension -- which is ok--but not full intellisense.
I am baffled as to why this is missing. Do I need to import/reference something from NetSuite--despite using their extension already?
How do I enable intellisense in VS Code for SuiteScript?
See my previous answer to a similar question. It's possible to use the Head-in-the-Cloud bundle to create javascript transpiled from TypeScript files. The code completion is good and you have the added benefit of type checking.
Is it possible to run Visual Studio Code commands from Markdown? I noticed that, for example [cpptools](vscode:extension/ms-vscode.cpptools) shows the extension's page. I wondered if executing a command from the command palette would also work, and if it is something of an URI.
It proved difficult to track down the documentation but in fact this is possible, see: https://github.com/microsoft/vscode/issues/140733
Say your command is referenced as pkg.command, then this URL in Markdown can be clicked to execute it:
[Run It](command:pkg.command)
This works out of the box in modern VSCode.
Link processing using protocol vscode for example [cpptools](vscode:extension/ms-vscode.cpptools) is performed only by Visual Studio Code. For now, it handles links if they point to extensions, but does not support link to commands. But the Visual Studio Code development team can add this if they see fit for the developers.
But, in my opinion, this functionality is not necessary.
I have a vs code extension (currently private), and it runs fine when I run it via the VS Code debugger, (i.e., a "Launch Extension" target in my launch.json). However, when I install the extension from a vsix file, the extension never activates.
Here's what I tried:
View elements & commands show up, which implies the package.json is being read correctly.
I placed vscode.window.showInformationMessage(...) statements in my extension.js and extension.js's activate() methods. I see expected output when I launch via VS Code debugger, but not when installed via vsix file.
I changed the activation events to include "onLanguage:javascript", hoping that opening a js file would cause my extension to activate, but it didn't.
A few questions:
Any suggestions on what is going on here?
Any suggestions on how to debug this?
Any instructions on how I can attach a debugger?
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.