Presentation Notes – Debugging Javascript with Chrome

Smart SVN, WebStorm, Winere, Chrome Developer

Web Storm -> Winere

JUnit – Optional [was not reviewed]

Using Winere

  • CONSOLE: SOMETHING_something -httpPort somePortNumber -boundHost -all-
  • Place target script at the top of the HTML page to capture all errors following

QUESTION: Why would you use Winere?

  • ANSWER: You wouldn’t. You would use Chrome’s debugger

If you load the .JS files the non-traditional way in your project, Chrome will not pick up on the errors

  • In the Chrome developer window pick the “Scripts” tab

From Chrome developer window pick the “Console” tab and reload browser after making corrections or changes to .JS script code

  • Don’t forget to clear the console of old data

Add “selectedDocObjectName” as a watch by typing the word “selectedDocObjectName” in the Watch Expressions screen of the Chrome developer window

  •     To remove a watch expression click the minus button to the left to the watched expression name
  •     Special attention to getCmp() from Sencha-Touch

We can toggle between SQLite on the Browser verses on the Device

  • Be sure to install JS Eclipse pluggin

Chrome verses Firebug – What’s the Difference?

  • Since Chrome uses WebKit it is much better given that both Android and iPhone use it as their browser engine
  • Firebug on the other hand uses Gecko

The “Timeline” Tab in the Chome Developer Window is better used for more asynchronous testing.

  • It works best when there is a server to collect the time values from

The “this” object in this.someName in Chrome verses Wiener

  • In Chrome, “this” is the current object, while in Winere it only references in general the whole DOM

Ext.Namespace in Javascript makes sure things are defined before being created

CSV – version control

  • Eclipse – LogCatalog – Android
  • Winere is helpful in completing the Debugging from there

Process pointed out – after getting the .JS script as clean as possible, drop it into the asset folder with your other .JS files

Verbose setting and configurations – WATCH OUT FOR THIS GOTCHA

  • After changing a setting and config for Verbose Android performance, things got messed up and required the complete deletion of the metadata
Advertisements

I am a software engineer whose has many interests. My current distractions are ontology, mobile device technology, medical bioinformatics, and micro-robotics.

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: