#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    18
    Rep Power
    0

    Real time variable monitoring


    Hi, I have a webpage connected to a websocket and javascript is dynamically updating the variables based on the messages send. I would like to have some sort of tool to see what the content of the variables is on a real-time basis, is something like this available?
  2. #2
  3. Autodidact
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Location
    Canada
    Posts
    741
    Rep Power
    833
    Soldiers, from the height of these pyramids forty centuries look down upon you.
    ▪ Napoleon, on the eve of the Battle of the Pyramids
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    18
    Rep Power
    0
    Thanks for the reply; not sure if I expressed myself clearly enough, so I'll try to rephrase.

    What I am looking for is more for debugging purposes, some sort of tool that shows the contents of the variables while the webpage is active and updates are being sent to the webpage over a websocket.
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,296
    Rep Power
    7170
    All of the major browsers have either built-in tools or plugins that let you do this.

    In Chrome, right click anywhere on the page and choose Inspect Element.

    In Firefox, use the Firebug plugin.

    In IE, it's an option called Developer Tools under one of the menus.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    18
    Rep Power
    0
    Thanks, I had a look at this before, but couldn't find how to do it.

    Let's take this website:

    http://bitcoin.clarkmoody.com/

    If I right click and click "Inspect Element" (Chrome) a screen comes up.

    For example, I want to know the contents of the variable A in the script platform_201304221225.js

    Now, how do I find this content?
  10. #6
  11. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,296
    Rep Power
    7170
    After you've opened the element inspect, click on the Sources tab, then expand the "Watch Expressions" section on the right, click the add button, and enter a JavaScript expression that you want to "watch".
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    18
    Rep Power
    0
    Thank you.

IMN logo majestic logo threadwatch logo seochat tools logo