Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improved object parsing for certain types in scoped variables and con…

…sole
  • Loading branch information...
commit 710b3c274a3a7efa6d8604a5a9b70fed64226f6e 1 parent 1fb8d3d
@dannycoates dannycoates authored
Showing with 28 additions and 4 deletions.
  1. +27 −3 front-end/node/InspectorFrontendHostStub.js
  2. +1 −1  readme.md
View
30 front-end/node/InspectorFrontendHostStub.js
@@ -75,6 +75,9 @@ WebInspector.InspectorFrontendHostStub = function()
case 'null':
p.value = {description: 'null'};
break;
+ case 'script':
+ p.value = {description: value.text};
+ break;
default:
p.value = {description: value.value};
break;
@@ -83,14 +86,35 @@ WebInspector.InspectorFrontendHostStub = function()
};
function _property(prop) {
- var p = _valueOf(prop.value);
- p.name = String(prop.name);
+ var p = {};
+ if (prop.value != null) {
+ p = _valueOf(prop.value);
+ p.name = String(prop.name);
+ }
+ else if (prop.ref != null) {
+ p.value = {
+ description: '',
+ hasChildren: true,
+ injectedScriptId: prop.ref,
+ type: 'object'
+ };
+ p.name = String(prop.name);
+ }
+ else {
+ p = _valueOf(prop);
+ p.name = String(prop.name);
+ }
return p;
};
function refToProperties(ref) {
if (ref) {
- return ref.properties.map(_property);
+ if (ref.properties) {
+ return ref.properties.map(_property);
+ }
+ else {
+ return [_property(ref)];
+ }
}
};
View
2  readme.md
@@ -67,6 +67,7 @@ This project started as a Chrome extension. For more info see the [wiki](http://
* the WebKit Web Inspector debugger is a great js debugger interface, it works just as well for node
* uses a WebSocket to connect to debug-agent, so no polling for breaks
+* remote debugging
* javascript top to bottom :)
## Known Issues
@@ -74,7 +75,6 @@ This project started as a Chrome extension. For more info see the [wiki](http://
This is alpha quality code, so use at your own risk:
* be careful about viewing the contents of Buffer objects, each byte is displayed as an individual array element, for anything but tiny Buffers this will take too long to render
-* if the 'this' object in a call frame is the global object, expanding it yield nothing
* while not stopped at a breakpoint the console doesn't always behave as you might expect
* pause on exceptions doesn't play nice with the node event loop
* closing the inspector does not stop debugging, you must stop inspector.js manually
Please sign in to comment.
Something went wrong with that request. Please try again.