How do I get debugging to work after building VS Code from source? - visual-studio-code

I built VS Code from source following the guide How to Contribute. It seems to build fine and launches in Electron.
Problem:
When I try to build vscode-samples, both with the included JavaScript and TypeScript versions (I ran npm install on each first), I'm not able to enter debug mode with F5. It says "Error: No extension installed for 'node' debugging."
Also...
I tried running and debugging an extension I had previously worked on for VS Code (I'm able to do this on the distribution available on http://code.visualstudio.com.
However, I'm getting a similar error:"No extension installed for 'extensionHost' debugging."
Any help would be greatly appreciated. Thanks!

The Dev build version that you are running does not include the node-debugger extension required for debugging node apps.
Lots of VSCode functionality are implemented as extensions, when the product is shipped those extensions are bundled into the released version.
if you need to run the node debugger extension within the build version, you need to add the extension to the OSS build extensions folder, to do that:
cd ~/.vscode-oss-dev/extensions/
git clone https://github.com/Microsoft/vscode-node-debug && cd vscode-node-debug
npm install && gulp build
This will pull the node extensions to dev build extension folder, then will build the extension. Next time you run, the dev build will load this extension, you will be able to do node debugging.

Related

Vs-code extension error: This extension is deprecated as it is no longer being maintained

there are problems in this way in some extensions that I have installed.
have you seen this problem ?
When I deleted vs code and uploaded it back, nothing changed.
This is just a way for the authors to explicitly tell that the extension is no longer being maintained (see this github discussion about how it works).
As for the npm extension, in the Details section the authors say:
ā¯—IMPORTANT: This extension has been deprecated. Support for running
npm scripts is now provided by VS Code. You can run npm scripts as
tasks using task auto detection or from the npm scripts explorer.
Basically it means that VSCode supports this functionality out of the box now, and there is no need for an extension to run npm stripts.

Compiling OpenSC on Windows

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?

What code do I need to enter to make expo project function?

I am not a developer, but I had an app built a couple months ago. The developer we had won't help us at all anymore (not sure why).
Please excuse me if I don't use proper terms.
So the project was done on Expo. I no longer have access to the original expo project, but I have all the code he wrote in a Github repository.
Is is possible to take the code from Github and paste it into Expo XDE and possibly reproduce the app on Expo? (Or Does that sound possible?)
Please let me know.
Yes, you could do this. It is important, that you copy all project files from the GitHub repository into your new Expo project. Don't forget to download all necessary libraries into your new Expo project, e.g. via npm install.
I'm a complete react native noob, I've been doing this, and I love it:
Develop prototype on https://snack.expo.io
Here I can develop and test on the browser, test on my phones, and on emulators. It's great.
When I'm ready to build, I download the code package from the Snack IDE
This downloads a zip file with everything except Expo and imported libraries.
I unzip and go into the folder with my terminal and install the libraries.
Inside the folder, I run these commands to install Expo and the regular libraries:
$ npm install expo # install expo
$ npm install # install a bunch of required libraries
# Then I run these two lines until my project builds
$ npm run web # try to run - it will tell me which libraries to install, one by one
$ npm install <library> # install each library
Eventually I'll move to using command-line only, but this is both a no-brainer for a noob like me and it's like training wheels for me to learn npm and expo.

Programming in Swift on Linux

I would like to prepare the environment for working with Swift on Ubuntu 16.04.
I installed Swift and Atom editor.
I installed the Script package, which allows me to run code from the Atom editor.
Generally it is nice when I compile and run one file (Ctrl+Shift+B shortcut).
The problem is when I would like to build a project composed of several files.
Classes defined in the other files (not the one I compile) are not visible (compilation error).
Is it possible to configure the editor to compile and run the entire project?
How to import external library, eg ObjectMapper ?
You can use the Atom package build. It allows you to create custom build commands and such by using common build providers. You can build with a Makefile or JSON or CSON or YAML or even Javascript. It provides enough flexibility that you can build just about anything. Just make your build file so that it points to all the files to build with the right compiler (probably swiftc in your case). With a Javascript build file, you can even specify a command to run before and after the build, say, to run your newly built program.
There's a great open source project I have been watching called Marathon. It's a package manager and they have been Working on a deployment on linux. I'm not sure how much success they have had, but you can follow along here and maybe help out.
https://github.com/JohnSundell/Marathon/issues/37
Edit: It looks like it does work on linux!
git clone https://github.com/JohnSundell/Marathon.git
$ cd Marathon
$ swift build -c release
$ cp -f .build/release/Marathon /usr/local/bin/marathon
For dependencies, you should use Swift Package Manager.
You can check how Vapor is built - it is prepared for build apps for Ubuntu too.
Also, Vapor toolbox would help you with other projects
https://docs.vapor.codes/2.0/getting-started/install-on-ubuntu/
You can build a Swift project using VS Code + Swift Development Environment extension
If steps on the link above are not clear enough, I've put more details in a blog post

How to install extension for Resharper command-line tools

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.