Ionic 2 improved and now debuggable from WebStorm

How to debug Ionic 2 from within Webstorm

This post talks about the improvements in the latest version of Ionic…

And this explains how to set up debugging but doesn’t make it quite clear where to do one step…

The best way to prove it can work is to start from a new Ionic project. If you’ve got an existing project, skip to the end of this post.

C:\Samples> ionic start HelloIonicWebstorm –v2 tabs

(goes to make cup of tea…)

(mmm cold pizza! nom nom…)

cd HelloIonicWebstorm

ionic platform add browser

Run Webstorm, open c:\samples\HelloIonicWebstorm

Edit tsconfig.json and make sure there is a sourceMap line:

"moduleResolution": "node",
"sourceMap": true,
"target": "es5"

Edit package.json and add a config section with an ionic_source_map member:

 "name": "ionic-hello-world",

"author": "Ionic Framework",
 "homepage": "",
 "private": true,
 "scripts": {...

Run-Edit Configurations-Add-Phonegap/Cordova-

  • Name the configuration,
  • check your executable is ionic.cmd,
  • check working directory,
  • command should be serve
  • platform should be browser


Run the Ionic Serve configuration

Run-Edit Configurations-Add-Javascript Debug and

  • name it TypescriptDebug
  • URL should probably be localhost:8100 (the default ionic serve url)
  • click the folder for your src directory and Apply


Create a ngOnInit() method within home.ts and set a breakpoint at the end of that method:


Run the Ionic Serve (Run… Run… choose Ionic Serve)

Run Typescript debugging (Run… Debug… choose Typescript)

Check that “JetBrains IDE Support is debugging this browser”

You may have to close all your browser windows and retry.

Finally had a chance to read some of Josh Morony’s Ionic 2 blog posts which are very helpful, clear and short

If you have an  existing Ionic 2 project you will have to get your package.json and tsconfig.json up to the latest.

Re-read this post…

Copy package.json and tsconfig.json from your working new Ionic 2 project, or update the dependencies from here

Now delete the contents of node_modules in your project folder and

npm install

That will re-fetch the packages you need







search for text in sql objects

What am I using the SQL field PackagingID for?

Thanks to this awesomely useful answer I can find out!

SELECT sys.objects.object_id, AS [Schema], AS Object_Name, sys.objects.type_desc AS [Type]
,sys.sql_modules.definition COLLATE SQL_Latin1_General_CP1_CI_AS sql_text
FROM sys.sql_modules (NOLOCK) 
INNER JOIN sys.objects (NOLOCK) ON sys.sql_modules.object_id = sys.objects.object_id 
INNER JOIN sys.schemas (NOLOCK) ON sys.objects.schema_id = sys.schemas.schema_id
 sys.sql_modules.definition COLLATE SQL_Latin1_General_CP1_CI_AS LIKE '%PackagingId%' ESCAPE '\'
ORDER BY sys.objects.type_desc,,


Exmouth Means Business show: videodrome

To the show on Thusday..

Thursday 27th October 2016 0930 – 1530 at Exmouth Community College.

The event is organised by Exmouth Chamber of Commerce and thebestof Exeter and sponsored by Westerly BMW and supported by the Archant Group and Bay FM.

There are over 200 delegates coming so far where they will find a wide range of busiensses and organisations exhibiting (like ourselves), 2 speed networking sessions, 3 seminars and a networking cafe selling drinks and food throughout the day.

Come along and see ourselves and the other businesses and you might even meet some new contacts and do some business!
Tickets here:

Mercifully short video here: STAR video




Jint joy: execute js from within c# #itsyourfoot

Just followed this SO answer to look at Jint on github. The project has plenty of current updates.

Imagine you have a WebAPI in C# and your client wants to select rows with a javascript filter. Well with Jint you can run arbitary code on the server. You must only use this power for good #itsyourfoot

 public void ScriptEngineShouldFilterRows()
 //Loving !
 //install-package jint then...
 var engine = new Jint.Engine()
 .SetValue("log", new Action<object>(Console.WriteLine))

//get your json of objects e.g. from select * from cats for json row
 var json = @"[{""name"":""tom""},{""name"":""fritz""},{""name"":""felix""}]";
 //decide which cats you want
 var filter = "itm.canRead =,1)=='t';";

//write a js function filterrows that takes the rows (as a string) 
//and returns the selected rows (as a string)
 var js = @"
 function filterrows(rows) { 
 var itms = JSON.parse(rows);
 var filtered = [];
 " + filter + @"
//use the engine to call the function
 var v = engine.Execute(js)
 .Invoke("filterrows", json);
 //aagh got an exception. 
 //BUT there's a helpful error message that points you 
 //to the right row in your javascript...

//v now contains your selected rows



SQL Smalldatetime ends in 2079 (June 6th).


select CONVERT(smalldatetime,'26 Apr 2016')

select CONVERT(smalldatetime,'26 Apr 2106')

select CONVERT(datetime,'26 Apr 2106')

select convert(smalldatetime,CONVERT(datetime,'26 Apr 2106'))



To find which columns are affected,

select, from sys.columns c

inner join sys.tables t on t.object_id=c.object_id

where system_type_id=58

whoo! that’s my pension sorted out. no, wait, I’ll be dead…