/* See license.txt for terms of usage */

define([
    "firebug/lib/trace",
],
function(FBTrace) {

// ********************************************************************************************* //
// Constants

function pauseGrip(context, args)
{
    var actor = args[0];
    var type = args[1];

    var context = Firebug.currentContext;
    if (!context)
        return "No current context";

    var client = context.debuggerClient;
    if (!client)
        return "Debugger client not available";

    var thread = client.activeThread;
    if (!thread)
        return "The debugger must be paused";

    if (!actor)
        return "No actor specified";

    var grip = thread.pauseGrip({actor: actor});
    grip.getPrototypeAndProperties(function(response)
    {
        Firebug.Console.log(response);
    });

    return Firebug.Console.getDefaultReturnValue(context.window);
}

// ********************************************************************************************* //
// Registration

Firebug.registerCommand("pauseGrip", {
    handler: pauseGrip.bind(this),
    description: "Helper command for accessing server side Grips. For debugging purposes only."
})

return {};

// ********************************************************************************************* //
});

@@ -706,16 +706,30 @@
 r%7D);%0A   
+ var handler =
  grip.ge
@@ -751,17 +751,338 @@
 operties
-(
+;%0A    switch (type)%0A    %7B%0A        case %22object%22:%0A            handler = grip.getPrototypeAndProperties;%0A            break;%0A%0A        case %22function%22:%0A            handler = grip.getSignature;%0A            break;%0A%0A        case %22decompile%22:%0A            handler = grip.getSource;%0A            break;%0A    %7D%0A%0A    handler.call(grip, 
 function

Extend the pauseGrip() command line command (just for debugging)