Wednesday, August 12, 2015

VS Code Update v0.7.0

And after only one day of my discovery of "add /// reference...." thing in VS Code, and I don't need to say how happy with it I was, in this, very last update this is removed. You no longer need to add reference, you just need to do download .d.ts files and; presto, it works.

Here is excerpt;

We also updated the quick fix code action. Add /// reference for typing file was renamed because ///references are no longer needed to get IntelliSense from .d.ts files. The action is now called Download type definition for some typing file and it downloads the .d.ts file only. "

Full article can be found on Visual Studio Update pages.

Tuesday, August 11, 2015

VS Code

Here is my first impression with VS Code.

Code assistance

Today I tried Visual Studio Code, and I was really happy with it. I first tried code assistance for JavaScript and it is really good. It finally does a good job with suggesting a variable or object from other JavaScript files in folder. Yes I know, there are lot of developer tools that can do that, but I was amazed that this is Microsoft product, and this work "out of the box", no need to configure anything and no need to download 3rd party plugins or something.

If you are using Angular or Ember you can import intellisense for those. When you write word "angular." then word will be underlined with green line. Mouse over it and light bulb will show you some options. Option is "Add /// reference to ....." and when you add reference, and presto, you will have intellisense enabled for JavaScript Framework.

GitHub

VS Code come with GitHub integration, but you need to install it on your own. On Windows install it from http://git-scm.com/ if you already have installation of Git on your Windows machine, and Code says that there is no Git installed, you need to add it to your Path variable (Windows Key + Pause/break -> Advanced system settings -> Environment variables) and restart Code. If now Code recognize that you have Git installed but cannot recognize your existing repository, I advise you to reinstall your Git from address above, but when Git installation asks you to adjust environment variables, chose "Run git from Windows Command Prompt" in this way environment variables  will be set correctly and Code will see your Git repository correctly. Naturally you have to restart VS Code after Git install.


Debug

VS Code can debug Node and Mono applications, so I started my Node application from VS Code, it raised command prompt, connected debugger to Node server and started my application. If you put brake point in your Node.js code, execution of program will stop and you can debug your Node code like you are in full Visual Studio environment. Honestly didn't try Mono yet, but I will.


What surprises me is general lightweight of all of this. I am MS developer, and i love Visual Studio but, I hate when I need to wait him to start up, to try (and then fail) to connect to TFS when I am offline. Everything is heavy, need long time to install etc. With VS Code everything run fast and you have intellisense, you have  Code Information Indicators for C# code and much more little helpers that can help you programming.




Friday, December 19, 2014

Visual Studio Online and Toggl

In my work I use TFS (Team Foundation Server) to track work, you know, to write Product Backlog Items, to write Bugs. I also use Toggl to track time spent on particular task.

For those unfamiliar with Toggl, Toggl is simple time tracker, and according to their website, Toggl kills timesheets. It is simple, it is mobile, and have nice reports.

And until recently, if I wanted to track my time, i needed to manualy enter on what task i was working and select project for witch i log time and hit big red button "start".

It looks like;


But from other side, I also use Trello boards, and there it is, Toggl-button, cute little Chrome extension witch allows you to turn on Toggl timer from other applications. 

It collect some data from page DOM and send it to Toggl API and presto; Toggl time tracking trello card on witch you pressed Toggl-button.

And now, my problem was jealousy, i wanted something like that in my TFS or my Visual Studio Online. I wanted to be able to track time on work items with single click, not to c/p text from TFS.

I politely ask Toggl team, "please sir, can i have this?" and they say "we do not have that in our current roadmap". So I took things in my hands, or better under my fingers, and i created one on my own. 

Here is my fork of official repository for Toggl-button.
https://github.com/ReddwarfCro/toggl-button
I created pull request, maybe it will be merged, maybe not. Anyway if you need this, you can clone repository and load extension into Chrome. If it become official, you can install it from Chrome store.

It look like this;
In my Visual Studio Online, i have project, and i created test bug and test PBI
When work item is opend, Toggl-button is inserted in toolbar
Cliking on "Start timer", work item is being time tracked in Toggl and form is opened
I collect data from work item title, project is collected from project name, and if in Toggl you have project with same name, Toggl-button will try to match that. If matching is successful, project will be selected in dropdown menu.
After confirming, Toggl-button on that work item will change state.
And basicly that is it. 

I hope that this will be useful to someone. 

If you are using your own TFS installation, Toggl-button extension will work, if not, you have to customize extension to meet your TFS name.
I tested it on both, Visual Studio Online and on my own TFS installation.