How to debug a VS Code extension when loaded from VSIX? - visual-studio-code

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?

Related

Unbound breakpoint in VSCode builtin extensions debugging

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.

VS Code JavaScript Hint

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?

Visual Studio Code Love2D support extension detecting love.app as a directory

I have just started with löve because of an internet course I'm on, and I'm using Visual studio code as my editor. The course recommends that I use the "Love2D Support" extension with Visual Studio. It allows me to run the code directly from VS by pressing Command + L.
Although when I do it, VS outputs me this error:
The setting specified in pixelbyte.love2d.path must be an executable file, not a directory. Check your settings.
The path I have input in the settings is /Users/My_Username/Desktop/love.app
I am 100% sure that it is the correct directory. What is the problem?
Thanks for answering!
The actual executable file in Mac is /Applications/love.app/Contents/MacOS/love so put this in your pixelbyte.love2d.path command in vscode and you are good to go.

How can I set non-persistent debugging parameters in Visual Studio Code?

I'm using Visual Studio Code to do some Python debugging. When debugging, I want to specify some temporary arguments to use. These are mostly just dummy values, since its for a test. I do not want the arguments checked into version control.
At the moment I'm modifying the launch.json file to add the args. However, this gets checked into version control. How can I specify arguments without adding to this file?
Normal Visual Studio IDE creates a temporary file for debug settings that doesn't get checked in. I was hoping for something similar to that for VSCode.

Is it possible to have Visual Studio Code custom configured from a .ps1 file?

I'm attempting to put together a standard VS Code build for my company. I have a ps1 file that copies/installs extensions for VS Code after it's been installed but I can't seem to find how or even if it is possible to then configure VS Code settings to utilize those extensions.
For example, one of the extensions is "vscode-icons". I can install the extension just fine but then the user needs to setup his preferences manually to actually use the extension by going to the File->Preferences->File Icon Theme->VS Code Icons.
Is it possible to have my ps1 install file actually make configuration changes so any user who opens VS Code has the custom configuration settings?
The config settings for VS Code are JSON files - just needs to locate and edit them.
First check what manual change is doing then create part in the script to edit the settings.
https://code.visualstudio.com/docs/customization/userandworkspace