Debugging in MeteorJS

Server debugging of web-application in MeteorJS (at this moment latest Meteor version is 1.2.1) is as simple as running

meteor debug

Meteor will automatically install node-inspector and you will see debugging interface at http://localhost:8080/debug?port=5858.

But in Chrome you can't collapse project tree or see value of variable because there is error (at this moment latest Meteor version is 1.2.1)

Uncaught TypeError: window.getComputedStyle(...).getPropertyCSSValue is not a function

The issue is in treeoutline.js part of node-inspector. The last version of Meteor uses old version of node-inspector. To fix this issue we should edit treeoutline.js manually.

Open treeoutline.js with your favourite editor on line 943 (following path may be different for your system)

gvim +943 ~/.meteor/packages/meteor-tool/.

and change lines 943, 944 to

var paddingLeftValue = window.getComputedStyle(this._listItemNode).getPropertyValue("padding-left");
var computedLeftPadding = paddingLeftValue ? parseFloat(paddingLeftValue) : 0;

That's it. After that restart meteor debug.

comments powered by Disqus