I'm working on scripting the setup of our dev machines via chocolately, etc. and I've gotten it to install VS Code, but my attempts to script adding extensions end in failure.
ps> cmd /c code --install-extension ms-python.python
gives...
Installing extensions...
self signed certificate in certificate chain
Failed Installing Extensions: ms-python.python
I can, however, manage this inside of VSCode without an issue.
Any ideas on how to resolve this?
fyi: yes, I'm in a corporate environment. I believe we have a proxy server but that's the extent of my knowledge(I'm an ignorant embedded developer, unwise to the ways of the internet)
also fyi: VSCode was installed via chocolatey, if that matters.
While it doesn't directly answer the question (it appears that the CLI part of vscode does not respect proxy settings), I resolved my specific problem by downloading the .vsix files for the extensions required and put them in my configuration-as-code repo/deliverable.
code --install-extension vscode_extensions\cpptools-win32.vsix
Seems to work fine. It's a mild pain in the butt to go and download each one (there's a link available on the market place for the extension marked: 'Download Extension'), but at least I can get them installed and my users can update to the latest version after the fact.
Related
I see a few guides for installing the pg_cron extension in windows, but its very confusing. Is there any guide that can help?
A simple create extension in the database doesnt work. I get the below error :
ERROR: could not open extension control file "C:/Program Files/PostgreSQL/13/share/extension/pg_cron.control": No such file or directory
SQL state: 58P01
You have to install the extension first.
Since you are using Windows, things will get complicated. You need a C compiler and build instructions from source. There are no such build instructions available, but somebody has managed to do it before and suggested modifications that were never merged.
Based on this and my personal experience with pg_cron bugs, I have the feeling that Microsoft doesn't care for this project very much, and that you will have a hard time getting it to run on Windows.
Alternatively, you could try your luck with pg_timetable, but you'd have to build that from source too.
You might end up using pgAgent, for which pre-built Windows binaries exist.
Context:
I am following the guide for the open source project OpenSC https://github.com/OpenSC/OpenSC to compile the solution on Windows and get the opensc-pkcs11.dll module to use it for communications (such as OpenSSH) with HSM's via PKCS#11 standard. Currently I am using the latest stable release 0.21.0 (msi installer) and it works perfectly. However when I use https://github.com/OpenSC/OpenSC/wiki/Compiling-on-Windows guide to compile the solution using Visual Studio Developer Command Prompt I can successfully build the libraries however the opensc-pkcs11.dll always returns pkcs11: 0x5: CKR_GENERAL_ERROR when I try to use it and I am not sure what am I missing here.
Setup:
git clone https://github.com/OpenSC/OpenSC.git
git checkout 30180986a08cf71fe4af4b50251a8bb5b1ab95af (0.21.0 commit for the right version)
Manually Creating Built Source Files
nmake /f Makefile.mak
Building it for x64, with x64 Native Tools Command Prompt for VS 2019.
That should be it according to the guidelines as I do not need openpace/openssl/zlib to compile the opensc-pkcs11 as far as I understand.
Problem summary:
If I download from releases https://github.com/OpenSC/OpenSC/releases version OpenSC-0.21.0 the compiled opensc-pkcs11.dll works as expected
If I compile it from source code based on v0.21.0 commit I get 0x5: CKR_GENERAL_ERROR when trying to use the library for e.g. OpenSSH, tested that this happens for other/previous commits as well, there for I suspect that I am missing something here.
Has anyone experienced the same issue? Maybe there is some build config anyone could share so I can understand what am I missing here?
Is there a way or steps to follow to integrate a yocto SDK (standard or extensible) with VSCode? I want to cross-compile, remote connect, and debug a C/C++ application within VSCode for target hardware using a yocto generated Linux image. Is this possible? I know of the bitbake extension but couldn't find one for the SDK. Thank you!
Conservatively, I would say it depends on the level of integration you want to achieve but I use regularly VS Code to edit and build, sometime to debug C applications using a Yocto toolchain, that's really easy for Makefile projects for example.
Assuming you do not ask for Yocto integration into VS Code (I don't know if something exists) but really to use the tools generated by the SDK from Yocto and that you already are familiar with Yocto toolchain usage.
I personally compile on Linux server remotely from a Windows PC. The server contains therefore my projects and the Yocto toolchain.
I use for that the nice Remote SSH extension from Microsoft on VS Code. From there, I can edit easily the files, compile and a terminal is available (that's out of the scope of your question however).
So if working as me or directly in Linux, you can create a Makefile/CMake project for example. The C/C++ VS Code extension is a must have.
Each time you start working, you source the Yocto SDK toolchain and compile directly using make from the terminal window of VSCode. If you want to automatize the build step, you can use the task feature of VS which allows you to launch build script for example.
Regarding the remote connect, the terminal window of VS can also have multiple sub-windows with various connections like SSH to the target. The build script can also use scp to send the generated binary directly to the target but your question is vague regarding what you want to do.
Finally for the debug aspect, GDB is well supported in VS Code and the official doc is a good start as well as the C++ debugging doc.
On the Yocto side, you need to add gdbserver to the image running on the target, it can be done by adding the following to your conf/local.conf:
EXTRA_IMAGE_FEATURES += "tools-debug"
If you want to have debug information for the shared libs on the target, you also need to add:
EXTRA_IMAGE_FEATURES += "dbg-pkgs"
Finally, the SDK must be generated with the same options as the image running on the target and will contain the cross-gdb tool like -gdb to be used on the host side.
So that's possible but requires some setup especially the debug part. As far as I know, there is not a VS Code extension managing all these steps for you automagically.
every time i download visual studio code i have to re download all my extensions, there is some way for save config and extensions on hotmail account?
Before you update VS code dump your extension list at the command line.
To make it easier to automate and configure VS Code, it is possible to list, install, and uninstall extensions from the command line.
When you download an extension, put the extension on a share. Then always install the extension from that share.
Some users prefer to download an extension once from the Marketplace and then install it multiple times from a local share. This is useful when there are connectivity concerns or if your development team wants to use a fixed set of extensions.
From: https://code.visualstudio.com/docs/editor/extension-gallery
We're currently using the Resharper command-line tool 2016.3 on our CI build server to inspect code for issues at build time. It's working pretty well but I still have an issue and I can't find any proper documentation on that : how do I install and configure an extension using the command line. For example, I want to add the Cyclomatic complexity extension to my analysis. Documentation said to use the -x switch with the name of the extension (PowerToys.CyclomaticComplexity). The code inspection runs but the complexity warning aren't included in my result file, probably because the extension isn't installed on my build server which make sense. I don't have VS installed on my build machine (and I would prefer not to have to) so how can I install the extension "manually" ?
Thanks
The command line tools in 2016.3 don't currently fully support loading extensions. This comment in the issue tracker has some steps that might be able to support - basically put the .nupkg of the extension in the product folder. YMMV.