Debugging apps console.dir


I am going through the debugging apps tutorial, the part where we change console.log to console.dir. I’m still getting “object object” as my output. What am I doing wrong?

I’m also getting this message:
CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: Error: Css styling failed: Error: undefined:1:16: missing ‘{’



Regarding your CSS error, can you check app.css to make sure there are no syntax errors? If you’re using VS Code, those errors should now be flagged automatically.


Also getting this error. My initial, blank app reported no errors. Built with NativeScript Sidekick.
When I changed my home page location to /views/home/home to pick up my own home.xml screen the error appeared. There is no /views/home/home.css file. I can create a css file to see if it’s because it’s missing but I still get an error even if my css file exists. If I copy the template home page xml code over my own code the error disappears. App still refreshes and syncs, just still logs the error. When I put my own code back in, error reappears. But there is no css file in my app yet.


Also getting this error, I just downloaded
tns create Groceries --template nativescript-template-groceries

app.css it’s fine, platform.ios.css and are fine, everything looks fine.


This is happening to me when the scss file of a page is empty, to reproduce remove everything from a page scss file and restart the command tns run ios, then navigate to that page.


After installing the template for the tutorial via

tns create Groceries --template nativescript-template-groceries

then running

tns run ios

I received the same error,it seems that empty .css files are the problem after inserting the following into app.css and login.css,the warning message dissapeared :smile:

.class {} which shows that the problem is empty css files.

Another suggestion was to update the tns-core-modules to 4.1.0 via

npm install tns-core-modules@latest --save

This did not resolve the problem,am I doing something wrong or should I report a bug ?


I had the same issue, and couldn’t figure out what was wrong, but I actually had an incorrect syntax in my xml file, where I did not set the “row” property in one of my grid layout rows (row=""), when I set row=“0” the error went away.