Web socket remote debugging


Publish it as a NPM package to make installation easier

Benjamin Lupton 9 years ago updated by Sam Elliott 9 years ago 4
Steps 2,3 and 4 here https://github.com/manifestinteractive/socketbug/wiki/Install-Server

Could be turned into one command: npm install socketbug

If you publish it as a NPM package... Thoughts?

Return console command output back to the console.

John Kramlich 9 years ago 0
When executing arbitrary Javascript that returns a result, the result should be returned to the console.

For example, executing $('#mydiv').text(); in the console, the text of that div should be returned to the console.

If this is not directly possible, a new method should be created so that the returned value of such a command can be returned when wrapped in this method.

something like get($('#mydiv').text());

Create a Device Manager to keep track of multiple devices in the console

John Kramlich 9 years ago 0
Create a Device Manager inside of the console that allows you to give human readable names to currently connected devices.  This can be shown as a table consisting of four columns; name, receives commands, broadcasts messages, and log level.  For each device you can decide whether that device will send messages to the console and if so, what log level to do so.  You can also choose if that device receives commands from the console.

Two commands will need to be created to identify and name each device.   

The Identify command will send a javascript alert to each connected device.  The alert message will contain the device id.  This can be then cross referenced with the table in the console.  Clicking on a row in the custom can bring up an inline editor allowing you to provide a human readable name to the device id.

The name prompt command will send a javascript prompt command requesting the name of the device.  The user can then type the name directly on the device itself.

Each message received by the console should have a class applied to it that matches the device id.  This could be used to filter the output log by device.

error: pathspec 'origin/v0.4' did not match any file(s) known to git

SwitzerBaden 7 years ago 0
When installing node.js and trying to switch to v.04 branch via the command: 
git checkout origin/v0.4
 one may get the following error message: 
error: pathspec 'origin/v0.4' did not match any file(s) known to git
 if so, try frist running
git fetch
 so that the local repository grabs all new info from github. It just takes the information about new branches and no actual code. After that the git checkout should work fine. Bazinga!

Socketbug on Windows Server 2008r2?

Dower Chin 8 years ago updated 8 years ago 0
I've been trying to install Socketbug on my Windows Server, and I think I'm close, but it doesn't seem to work.
  1. I installed node.js 0.6.11 from nodejs.org.
  2. I then followed the instructions to do an npm install of socket.io... The instructions weren't clear if socket.io was to be installed in the nodejs location or not. But my first go around, I installed in the C:\Program files(x86)\nodejs folder.
  3. I uncompressed the socketbug folder to c:\inetpub\wwwroot\socketbug.
  4. When I tried running node socketbug-server.js it failed complaining socket.io was not found.
  5. I then ran the same npm command to install socket.io into the socketbug folder. 
  6. Re-ran the node command and socketbug looks like it's running.
The problem now, though is if I hit http://localhost/socketbug/client/example, I first get a "Stack overflow at line:0" in the browers, and the lower right of the screen is stuck at "Connecting to Socketbug"...

If I look at my command window, I see the following:

C:\inetpub\wwwroot\socketbug\server>node socketbug_server.js
   info  - socket.io started
   info  - handshake authorized 4729970731545680162
   info  - transport end

So, I'm not sure what to do or look at now. Also, if I hit http://localhost:8080, the browser shows me "welcome to socket.io", so I guess that's running ok?

Any suggestions?

Comparison with weinre?

Tim Closs 9 years ago updated 9 years ago 0
Sorry for the noob question, but can you briefly compare Socketbug to weinre? 

Seems that Socketbug is console based and is focused on JS debugging. Can Socketbug be used to connect Web Inspector (e.g. Chrome) to a client browser? 

If not, is there any way that Socketbug can provide full DOM/CSS inspection?

I am looking for a remote web view debugger/inspector that can not only connect to iOS/Android devices, and the iOS/Android desktop simulators, but also to the Qt web view control running within a Qt desktop app.


Handshake authorization not being done with Server.

Manisha Awasthi 7 years ago updated by Ricardo Richardson 7 years ago 1

I am trying socketbug to remotely debug my application but i am not able to establish a connection with server. 

I inserted the following code in my index.html

<script type="text/javascript">

        var _sbs = _sbs || {

            'version': '0.2.0',

            'host': 'http://localhost',

            'port': 8888,

            'group_id': '4704808A-80A9-6DD3-341F-E18A3F00563A',

            'group_name': 'Socketbug Demo Group',

            'application_id': '5E3E8FB6-86CF-6BF8-B4C4-6B2497BC388C',

            'application_name': 'Socketbug Demo Application',

            'debug_level': 4,

            'helpers': [],

            'libraries': [],

            'plugins': [],

            'connect_callback': socketbug_connect_callback,

            'disconnect_callback': socketbug_disconnect_callback,

            'message_callback': socketbug_message_callback



    <script type="text/javascript" src="http://localhost:8080/socketbug/client/application/sb.js" async></script>

my application running locally on port 8888. 

I just get following message when i start my server.

info  - socket.io started

But no handshake happens. Can someone please tell me What am i possibly doing wrong?



Error Authenticating Remote Debug Message

Yang Zhang 9 years ago 0

hi, i have a problem when use the socketbug

i run server successfully and open console and application to connect the server rightly.

but when i click DEBUG TEXT and other button in client/example/index.html

there occur error on server terminal which run socketbug_server.js

the ERROR:

zhangyang09@linux:/usr/local/socketbug$ node socketbug_server.js 

   info  - socket.io started

   info  - handshake authorized 7314333162030731849

   info  - handshake authorized 905616608131679385

Error Authenticating Remote Debug Message           <-- Click DEBUG TEXT button

{ stack: [Getter/Setter],

  arguments: [ 'clients', undefined ],

  type: 'non_object_property_load',

  message: [Getter/Setter] }

Error Authenticating Remote Debug Message

{ stack: [Getter/Setter],

  arguments: [ 'clients', undefined ],

  type: 'non_object_property_load',

  message: [Getter/Setter] }

I expect to look socketbug's excellent. can you help me, thanks.


socket bug running on mac, web server is windows IIS

Jorge Zingg Jorge 8 years ago updated 8 years ago 2
I installed socketbug on my Mac, I have a windows PC running as a web server for my app, the client is an iPad. 
I got all the pieces together, I connect the code to the remote host (http://myMac/ instead of localhost), I get the handshake on the socketbug server running in the Mac, I also can send remote js commands to the iPad (alerts and so on), but my main interest, to get the console logs and warnings from the pad to the socket bug console do not work. 
I can send a console.warn() from the socket bug console to be shown in the pad, but the ones in my code / in my iPad are just not shown in the console. I have not used query in my own code, can this be a reason? Any other ideas why?

Socketbug within Appcelerator Titanium web view

Andrew Alexander 8 years ago 0
Just found the answer to my problem - debugging embedded web pages within mobile application frameworks like Appcelerator Titanium - no more build and debug then hope for the best when i embed the pages.

Big problem - appcelerator only seems to work if i directly 'include' the javascript files into the web page - it looks like sb.js does the loading order for me - is there any chance of getting this documented so i can manually force this and therefore get the files included within my mobile app package.  (i.e. if i don't specify them, then the preprocessor for the mobile framework won't include the other .js files in the package and therefore they aren't available to sb.js)