How to use console.table() for debugging

I recently came across a little known function that’s really useful for debugging.

The console.* functions have always been a great tool. They output data to the Chrome Debugger console. They can be used for tracing, timing and other statistics.

However, they’re a bit clumsy for looking at structures.

For example, suppose you have a structure like this:

languages = [ _
    { name: "JavaScript", fileExtension: ".js" }, _
    { name: "TypeScript", fileExtension: ".ts" },_
    { name: "CoffeeScript", fileExtension: ".coffee" }_
]

If you execute console.log(languages), you’ll get a tree structured view of the data which you can expand.

But if you do console.table(languages), you’ll get this:

consoletable

Pretty cool!

AppStudio 3.2.8.8 released!

AppStudio 3.2.8.8 has been released. It has a number of stability improvements and fixes.

  1. Deploy: Chrome Packaged Apps now use proper icons.
  2. Find/Replace: Will not affect the background window (Mac)
  3. IDE: Problem with Edit menu item disabling with Code Window fixed.
  4. IDE: Ctrl V will not paste to the wrong place (Mac)
  5. Script Window: range check on size added..

The complete list of changes is here.

AppStudio 3.2.8.7 released!

AppStudio 3.2.8.7 has been released. It has a number of stability improvements and fixes.

  1. Design Screen: jQM Button images display in Design Screen.
  2. Design Screen: Positioning lines now cancel after right click as well.
  3. IDE: Problem with Edit menu item disabling fixed.
  4. Properties: Can now be edited again after changing.

The complete list of changes is here.

AppStudio 3.2.8.6 released!

AppStudio 3.2.8.6 has been released. It has a number of enhancements and fixes.

  1. Code Window: fix false negative syntax error on “Finally”
  2. Code Window: Problem with code folding fixed. (Thanks, Helen!)
  3. Controls: AdSense no longer affects subsequent controls.
  4. Controls: Double quotes are now allowed on jQM Buttons.
  5. Controls: Images can now be placed on jQM Buttons.
  6. Deploy: Build Status screen can now show the status of PhoneGap’s servers.
  7. Deploy: chromeIcon project property is now 192×192: Google updated their docs. If you are using this feature, you need to update the icon to the new size. This allows full screen Android apps if you are using Chome 31 or higher.
  8. Find Window: Type through problem fixed.
  9. IDE: Forms losing their order fixed. (Thanks, Jimmy!)
  10. IDE: Several new languages added as well as new material for existing ones.
  11. Libraries: Metro theme deprecated. Developer was not keeping up to date with JQM.
  12. Runtime: browserWarningMessage is now a function you can replace in your code.
  13. Runtime: If you have a Sub browserWarningMessageAfterScript(), it will be called after browserwarning is displayed.
  14. Runtime: Messages.js moved into nsb
  15. Runtime: Revert change to width calculation on NSB.MsgBox on some Samsung devices.
  16. Samples: Google Maps and Twitter updated to use their latest APIs.

The complete list of changes is here.

AppStudio 3.2.8.5 released!

AppStudio 3.2.8.5 has been released. It has an important bug fix.

Yesterday, we received a video from Jimmy Imossi in Gibralter, showing how to reproduce an issue we have been chasing all week. If a certain sequence of operations was followed, code could be saved to the wrong spot in the project. It’s a fairly complex sequence and was difficult to describe how to reproduce. Jimmy’s video nailed it and the issue is now fixed. Thanks, Jimmy – we owe you big time!

  1. Code Window: Fix code loss issue. (Thanks, Jimmy!)
  2. IDE: Fix jitter problem on “Menu” when fullscreen.
  3. NSB.MsgBox: revert change to width calculation
  4. Runtime: Improve how CStr and CDate handle undefined values

The complete list of changes is here.

AppStudio 3.2.8.4 released!

AppStudio 3.2.8.4 has been released. It has a number of enhancements and stability improvements.

  1. Code Window: Positioning lines now appear when mouse down on a control.
  2. Code Window: Fix problem with code folding.
  3. Documentation: Wiki and Locale files updated.
  4. Design Screen: Changes to contextual menus on Mac OS. Fixes Copy/Paste issue.
  5. IDE: Do not allow positioning above the top of the screen after disconnecting external monitor.
  6. Properties Grid: Save problem caused by multiple Script Windows fixed.
  7. Runtime: NSB.MsgBox can now display false as a prompt.

The complete list of changes is here.

AppStudio 3.2.8.3 Released!

AppStudio 3.2.8.3 has been released. It has a number of enhancements and stability improvements.

  1. Code Window: Select and right click to Go to Function Definition.
  2. Controls: Fix Readonly autocomplete for TextBox and other controls.
  3. Deploy: Fix problem with images on Chrome Packaged Apps.
  4. Design Screen: fix controls occasionally not copyable.
  5. Design Screen: Random controls sometimes added.
  6. IDE: Upper limit on serial numbers increased.

The complete list of changes is here.

AppStudio 3.2.8.2 Released!

AppStudio 3.2.8.2 has been released. It has a number of enhancements and stability improvements.

  1. Controls: Added Right property to Text control.
  2. Controls: Fix console message with RadioButton on IE11
  3. iWebKit: fix pseudo class defs for Chrome (Thanks, Doug!)
  4. Runtime: Order of startup events fixed.
  5. Script Window: remembers size from when last opened.
  6. Translator: Fixed Loop (a=b)

The complete list of changes is here.

AppStudio 3.2.8.1 Released!

AppStudio 3.2.8.1 has been released. It has a number of enhancements and stability improvements.

  1. Controls: Font size can now changed on Labels.
  2. Deploy: Path to chromeIcon (1024.png) fixed.
  3. Design Screen: Snap to Grid fixed.
  4. Runtime: browserWarning updated for changed iOS7 userAgent string.
  5. Runtime: Fixes for IE11.
  6. Runtime: NSB.MsgBox can now display numeric as well as string values.

The complete list of changes is here.

AppStudio 3.2.8 released!

AppStudio 3.2.8 has been released. It has a number of enhancements and stability improvements.

  1. Deploy: Apps now run on Chrome OS.
  2. Deploy: Apps now run on Windows RT.
  3. Deploy: Apps not using iWebKit can be used on Internet Explorer 11.
  4. Deploy: Improve browser warning message.
  5. Design Screen: fix problems with refresh.
  6. Design Screen: fix center control.
  7. Design Screen: fix problem that could lead to controls not being clickable.
  8. Samples: Update SAP sample for new server.
  9. Controls: jQM List icon can now be changed or removed.
  10. Controls: jQM Button has new Edit and Bars icons.
  11. Properties Window: Selecting onclick could terminate IDE.
  12. Runtime: Convert some alert functions to NSB.MsgBox, for Chrome Packaged Apps.
  13. Script Window: Horizontal scrollbar is now properly sized.
  14. Script Window: Fix problem that could mess up code.
  15. Script Window: Fix problem with block comments.
  16. Code Window: Fix problem with status coordinates.

The complete list of changes is here.