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/.1.1.10.8ucr2s++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/node-inspector/front-end/treeoutline.js

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