How can you get Copilot to turn on in all Dev Containers in VS Code? - vscode-extensions

I would like to use the Github Copilot extension each time I develop in VS Code, even when I have opened a project in a Dev Container. Right now, I have to manually install Copilot in each project each time the Dev Container opens.
I know I could specify "Github.copilot" in the devcontainer.json "extensions" list, but these aren't my projects, so I want a solution that will turn it on for me but not impose it on others.

You can specify default extensions that will open in every Dev Container, regardless of the configuration. Open the VS Code Settings, search for Dev Containers, and scroll to Dev Containers: Default Extensions. Then add "Github.copilot" to that list.

Related

How can installed packages of a Python project in Pycharm IDE be used in every new Projects

Hello from the other side,
Python file on pycharm
I pip installed some packages using pycharm terminal: mysql connector, pymysql, pillow, etc needed for my programmes.
I have created some Python files and imported mysql connector, pymysql, PIL, etc and my codes worked fine.
Recently I tried creating a new python file in a new project, when I tried to import mysql connector and pymysql, my codes get red underline, notifying me that the imported modules can't be found.
These are the same packages I imported in my previous files and they worked fine.
So why are they turning red underline and greyed out now?
Do I need to be pip installing these packages for every new project?
I tried to see how I could resolve this by making some researches and asking some friends. I was advised to go to the settings and try to create a new environment with the installed packages of my choice, and then checking the boxes for global inheritance and making it available for other projects.
After this, the OK button was inactive (greyed), so I couldnt apply this change. I discovered I was notified that the enviroment rowbox wasnt empty and that I should use a new virtual environment which is empty but I really don't know how to create this.
Please if you've encountered something like this before or can assist, kindly give me a step-by-step approach.
Open File -> Settings
Select Project Interpreter than go to the gear wheel in the upper right corner and select add.
Use Virtual Environment, select your prefered base Interpreter in my case 3.6 and add the name for the virtual environment and where you want to store it
If you don't need to I would suggest to not inherit global site packages
But you should select make it available to other projects.
Confirm it.
Afterwards the virtual env should be selected in project interpreter if not select it from the list. Right beside the List you see a plus, you can use this to add new packages with python (doesn't work all the time for me -> then use terminal)
I really thank everyone who made effort to attempt my question. After much trial, I was able to resolve it and I will post how I resolved it step-by-step to enable others like me understand better.
First, when installing our Pycharm, a folder is automatically created for storing every project we shall be working on, this folder becomes the database of our projects. In most cases, folder is stored in our C:\drive.
Now, open your pycharm window (I mean your working template),
File ----> open (this diplays the folders in your drive) ----> select the folder for storing your Pycharm projects and click ok. NOTE: do not open this folder to show your projects, just click on it and click ok. There are some situations whereby the Pycharm projects folder is already displayed on our pycharm window, this is because we already chose it during our installation. In a case like this, no need trying to bring it to the Projects displayed in our window as it'd already be displayed in the Projects in our window.
Your Pycharm projects folder will then display in your pycharm window under Projects.
Click on the Pycharm projects folder under your Projects and it will be highlighted blue.
Go to settings ----> Project: (your pycharm projects folder will also show here)
By the right, select Project interpreter.
Do your normal installation of packages by clicking on the + sign at the right extreme (that is if you haven't installed any package before)
Then configure your environment setting by making sure the boxes for inheriting global site packages and making this available to other projects are checked.
When configuring your environment setting for the pycharm projects folder, the location path should also end with your pycharm projects folder\venv ; please do not include the name of any particular project in the location path as doing this will make these changes effective in only that particular project files.
Then click ok.
Whatever project your create under the Pycharm projects folder will then inherit every packages you've installed in the pycharm project settings.
I believe this will help those who have been having difficulty resolving this.

How to debug angular app using angular-cli webpack?

I used angular-cli#1.0.0-beta.10 before and now I updated to angular-cli#webpack beta.11. After a lot of custom changes I got it to work.
The only thing is that now I can not debug my angular app using webstorm and chrome debugger because I don't get any ts files using ng serve. With angular-cli#1.0.0-beta.10 it was very easy to debug my app using the Jetbrains Plugin.
How can I debug my angular app with Webstorm and the Chrome Debugger using ng serve?
How to debug with angular/cli
The new angular/cli version uses webpack which does not compile the ts files to an local directory like dist before (till beta 1.0.0-beta.10). Now it uses some memory like approach.
But you can find the ts Files in the Chrome Developer Tools in the "Sources" tab.
(new) Solution for angular/cli#1.0.0-beta.26 and newer
Notice: This solution was tested with version 1.0.0-beta.26 and 1.2.1
Notice: In this example I used port 5321 instead of 4200. Just use your port.
Debugging with Chrome Developer Tools
While running ng serve (also used in npm start), you can find your sources in the Chrome Developer Tools section: "webpack://":
Debugging Angular 2 App with angular/cli using JetBrains IDE
Just edit your Run/Debug Configuration in Webstorm/PHPStorm to following:
Set your Remote URL Path of your project directory to webpack://.
Set your Remote URL Path of your src directory to webpack://./src
(old) Solution for angular-cli#1.0.0-beta.10 - .14
Debugging with Chrome Developer Tools
While running ng serve (also used in npm start), you can find your sources in the Chrome Developer Tools section: "webpack://":
Debugging Angular 2 App with angular-cli#webpack using JetBrains IDE
Just edit your Run/Debug Configuration in Webstorm/PHPStorm to following: Set your Remote URL Path of your project directory to
webpack:////Users/...FULL_PATH.. //on Mac OSX
or
webpack:///C:/...FULL_PATH.. //example on Windows
Notice: on Windows you only need 3 slashes, on Mac you need 4 slashes
after "webpack:"
You can also check your Path by going to http://localhost:4200/main.map and search for any ".ts" File. You can easily copy the path of this file and paste it to your IDE Configuration Dialog.
EDIT: Perhaps you need to map the path adding "/src" to your src folder too. Thanks #born2net
Have Fun.
ok got it working,
you need to map both root and src.
see here:
hopefully it helps someone,
let me add that sometimes the debugger will miss your breakpoint so add alert('foo') or ;debugger code just before your breakpoint.
tx
will be adding and convering jspm projects to new cli
Angular 2 Kitchen sink: http://ng2.javascriptninja.io
and source# https://github.com/born2net/ng2Boilerplate
Regards,
Sean
2017 answer for:
angular-cli: 1.0.0-beta.26 node: 6.9.2 os: darwin x64
If you are having problems with this, go to your Scripts tab in your debugger and try and align your URL mappings according to what you see.
None of the other answers helped me because my version of angular-cli mapped things a different way.
What finally helped me was to add an additional / (forward slash) after webpack:///, so that there are 4 instead of 3. By default there were 3 forward slashes
The remote URL points to the same parent directory as on the left except the webpack://// schema.
Also you don't need to enable the TS compiler as often suggested.
MacOS
Angular-CLI 2.4.1
WebStorm 2016.3
You can use Augury which is a dev tool extension for the web browsers in order to debug angular applications.
Here is the link you could install:
https://augury.angular.io/
This tool is very useful in viewing the hierarchy of your routing in your application, Module and Components hierarchy and the Dependency Injection overview on each component.
Here is an Inject Graph of my project which illustrate my above explanation:
Please note that the above solutions do NOT let you set breakpoints in the html files of angular components when using IntelliJ. You can only do this in Chrome. I don't understand why this is not possible in IntelliJ.

Worklight Console does not show new changes to project -- seems to use original code

I am running Eclipse Luna 4.4.1 with Worklight Studio 6.2...
I have made changes to my Worklight project. For some reason, I cannot get these changes to be seen/previewed when opening in the Worklight Console...
I have made simple changes such as adding print (console.log) statements to see if these changes are making it out to the console... I have even removed design elements to see if I can get this preview to error out...
Here is what I do:
Highlight the app folder (the folder under the "apps" folder) and right-click
Select Run As > 2 Build All Environments
Once that is complete, I highlight the project folder (the topmost folder in the project) and right-click, selecting Open Worklight Console, which opens the console in Firefox
Click the Preview as Common Resources link in the Console
The "old" code/project runs -- no changes appear
I have tried Cleaning the project, closing and re-opening Eclipse, rebooting my machine, etc. but nothing seems to shake this up. Worklight seems to use the "old" code no matter what I do in Eclipse...
Is there a setting on Worklight I may be missing?
Starting Worklight 6.2 you do not need to either build or deploy your application in order to see changes made to web resources.
The following should suffice:
Create a Project and application
Run As > Run on Worklight Development Environment
Open console, view the application (keep this tab open)
In Eclipse, change some resource (image, CSS, HTML, JavaScript)
Return to the previously opened tab and refresh it
The change should be visible to you.
Something to try:
Close Eclipse
Open your TMPDIR and delete the wlBuildResources folder
Open Eclipse, try again
You can also try adding a mobile environment to your application; there are some reports this some times, show how, helps 'refreshing' the web resources used while previewing applications
You can also make sure you are using the very latest 6.2.0.01 iFix; there were preview-related fixes in the past. You can get it from IBM Fix Central website (assuming you are an IBM customer/business partner; for evaluation purposes you should download the latest available version, from the Eclipse Marketplace - v6.3)
Note that Run As > Build all environment does not actually deploy your modified web resources to the server, it only generates the .wlapp for later consumption elsewhere, so I suggest to follow my steps at the very top of this answer, by using Run As > Run on Worklight Development Server, and later on simply save (ctrl/cmd-s) and then go to the console to verify the changes are there.

how do i chnage the desktop icon for a visual basic program (.exe)

im making a vb.net app and i want to set the icon, how can i do this?
--edit--
turns out i was a bit confused, and it was working. but the answers can still be useful for others.
If I understand the question and issue, your setup/installer might be missing something.
It would seem you did create a shortcut, add it to the Setup project to install to the Desktop (else you wouldnt have one at all)
Select the shortcut in your setup project, open the properties window
Click Target. The list of files you are installing will come up. Select the App.Exe (ie the main executable "MyApp.exe" ususally the primary output). I think Icon is supposed to be set to "Icon" as well.
I think those 2 things combined link the Desktop Shortcut's Icon property to Use the App.Exe's. If there is also a shortcut in the user's programs menu do the same thing (or drag drop a copy).
You are basically doing to the Setup Project's shortcut what you would do to a normal desktop icon to change it or set it. The proj apparently fills in the actual path etc at install.
EDIT
PUBLISH simply compiles everything and produces files for the dev to distribute. It is called PUBLISH because in many cases the output includes a ready to use Setup program for the END USER to install on the PC. (Based on your new Pic, you are trying to reinstall everytime you click the icon or file inside the folder.)
Again, if you do not add a Setup proj to your project, the default one is used and it gives no option for where to install and does not add a shortcut.
Just delete all that junk, Publish again to the default location (VS Studio\...Project name\bin\Publish). Go to that folder and run setup. It will still install to Users\AppData.. but will add a shortcut (to the program) to the start menu.
For a desktop icon, do the "Send To Desktop ..." thing. To INSTALL an icon, you have to add and modify a Setup proj to your Solution.
HTH
'The folder shows the icon for the app, but the icon for the form is different. change the form's icon(in the property grid) to the same as the app and you should see it then.
When you publish it there's 2 files produced that are basically setup files. One relies on the ClickOnce Application Deployment Support Library and the other is a standalone setup app. Since neither one is the actual app you designed, they aren't going to have the icon you want. You'll probably have to investigate other more configurable deployment options.

Is it possible to edit an IntellijIDEA project remotely via a web browser?

I am looking for something similar to RStudio-server (r-studio), but for programming in Java/Scala.
RStudio-server accessed via web is the same as the desktop version.
May be there are other equivalent solutions, given that my problem is scarce local resources to run my programs, but plenty of resources in a remote computer.
The more seamless, the better.
It would be also good if I could just run my program remotely seamlessly (outputing like if it was local and inside the IDE).
I recently starting using Chromoting to remote into a different machine that has IntelliJ. It's convenient in that it's built into chrome and I can pretty much do this anywhere because everyone has Chrome these days. It's a very good remoting tool but it still is remoting, it has its delays and minor problems (some keyboard shortcuts don't get sent through and those options haven't been added yet).
Just an idea for something to try.
It is not seamless, but I just managed to solve the problem using the right workflow:
In the local machine:
edit files in IDEA
[optional] set the output path, if any, to your favorite file hosting service (dropbox in my case)
commit with your favorite VCS (bzr in my case, it can need a push to the remote machine)
In the remote machine:
update with your favorite VCS
compile and run with your favorite build tool (sbt in my case):
sbt 'run-main experiments.AtomicBombMain'
[optional] In the local machine again:
[optional] get the generated files at the output path at the shared folder of your favorite file hosting service
Link with more details about the entire process since instalation until compiling:
sbt-intellij-idea-scala-debian-wheezy-how-to