Using Venkman to debug javascript generated by JSP

View: New views
4 Messages — Rating Filter:   Alert me  

Using Venkman to debug javascript generated by JSP

by Tech Stuff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm new to Venkman and fairly new to javascript (though not to developement in general) and am having some trouble.  I've inherited some code which runs in a pretty large framework and I'm having trouble debugging it.  I will admit up front that I don't understand how all of the architecture fits together but I think that these two pieces of information are relevent: (1) it uses the bindows framework and (2) the javascript I'm trying to debug does not reside in a .js file but is instead generated by a JSP. 

So, I go into the jsp and I add a debugger line to the jsp and then I launch Venkman and load the page which finally results in the JSP running and spitting out my javascript.  Control than switches to Venkman and it's obviously stopped at my breakpoint which is good.  The problem is that I don't actually see any of my javascript.  If I look at the call stack, the top entry claims to be BiScriptLoaderQueue.js line 998 and that is the file that I see in the source window.  However the file is only 245 lines long so 998 doesn't make any sense. The code that's actually displayed looks like this:

if (window.execScript)
{
  window.execScript(s);
}
else
{
  window.eval(s);
}

So, presumably bindows is executing my javascript and this is confusing Venkman.  One last detail: I do see the value of my local variables in the 'Local Variables' window so I'm sure that my breakpoint was hit and is executing, I just can't see the source.

Can anyone offer any suggestions?  I'm desparate to get this working.  Thanks in advance.

-ts1971   



     
_______________________________________________
dev-apps-js-debugger mailing list
dev-apps-js-debugger@...
https://lists.mozilla.org/listinfo/dev-apps-js-debugger

Parent Message unknown Re: Using Venkman to debug javascript generated by JSP

by John J Barton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tech Stuff wrote:
> Hi,
>
> I'm new to Venkman ...
>   window.eval(s);

I don't think Venkman has support for eval(). Firebug does.

jjb
_______________________________________________
dev-apps-js-debugger mailing list
dev-apps-js-debugger@...
https://lists.mozilla.org/listinfo/dev-apps-js-debugger

Parent Message unknown Re: Using Venkman to debug javascript generated by JSP

by Gijs Kruitbosch ("Hannibal") :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tech Stuff wrote:

> Hi,
>
> I'm new to Venkman and fairly new to javascript (though not to developement in general) and am having some trouble.  I've inherited some code which runs in a pretty large framework and I'm having trouble debugging it.  I will admit up front that I don't understand how all of the architecture fits together but I think that these two pieces of information are relevent: (1) it uses the bindows framework and (2) the javascript I'm trying to debug does not reside in a .js file but is instead generated by a JSP.  
>
> So, I go into the jsp and I add a debugger line to the jsp and then I launch Venkman and load the page which finally results in the JSP running and spitting out my javascript.  Control than switches to Venkman and it's obviously stopped at my breakpoint which is good.  The problem is that I don't actually see any of my javascript.  If I look at the call stack, the top entry claims to be BiScriptLoaderQueue.js line 998 and that is the file that I see in the source window.  However the file is only 245 lines long so 998 doesn't make any sense. The code that's actually displayed looks like this:
>
> if (window.execScript)
> {
>   window.execScript(s);
> }
> else
> {
>   window.eval(s);
> }
>
> So, presumably bindows is executing my javascript and this is confusing Venkman.  One last detail: I do see the value of my local variables in the 'Local Variables' window so I'm sure that my breakpoint was hit and is executing, I just can't see the source.
>
> Can anyone offer any suggestions?  I'm desparate to get this working.  Thanks in advance.
>
> -ts1971    
>
>
>
>      

Turn on pretty print (the button with the flower on it. :-) ).

~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
dev-apps-js-debugger@...
https://lists.mozilla.org/listinfo/dev-apps-js-debugger

Re: Using Venkman to debug javascript generated by JSP

by Tech Stuff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It worked!  Thanks so much Gijs.

-ts1971

--- On Wed, 7/22/09, Gijs Kruitbosch <gijskruitbosch@...> wrote:

From: Gijs Kruitbosch <gijskruitbosch@...>
Subject: Re: Using Venkman to debug javascript generated by JSP
To: dev-apps-js-debugger@...
Date: Wednesday, July 22, 2009, 6:52 PM

Tech Stuff wrote:

> Hi,
>
> I'm new to Venkman and fairly new to javascript (though not to developement in general) and am having some trouble.  I've inherited some code which runs in a pretty large framework and I'm having trouble debugging it.  I will admit up front that I don't understand how all of the architecture fits together but I think that these two pieces of information are relevent: (1) it uses the bindows framework and (2) the javascript I'm trying to debug does not reside in a .js file but is instead generated by a JSP. 
> So, I go into the jsp and I add a debugger line to the jsp and then I launch Venkman and load the page which finally results in the JSP running and spitting out my javascript.  Control than switches to Venkman and it's obviously stopped at my breakpoint which is good.  The problem is that I don't actually see any of my javascript.  If I look at the call stack, the top entry claims to be BiScriptLoaderQueue.js line 998 and that is the file that I see in the source window.  However the file is only 245 lines long so 998 doesn't make any sense. The code that's actually displayed looks like this:
>
> if (window.execScript)
> {
>   window.execScript(s);
> }
> else
> {
>   window.eval(s);
> }
>
> So, presumably bindows is executing my javascript and this is confusing Venkman.  One last detail: I do see the value of my local variables in the 'Local Variables' window so I'm sure that my breakpoint was hit and is executing, I just can't see the source.
>
> Can anyone offer any suggestions?  I'm desparate to get this working.  Thanks in advance.
>
> -ts1971   
>
>
>       

Turn on pretty print (the button with the flower on it. :-) ).

~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
dev-apps-js-debugger@...
https://lists.mozilla.org/listinfo/dev-apps-js-debugger



     
_______________________________________________
dev-apps-js-debugger mailing list
dev-apps-js-debugger@...
https://lists.mozilla.org/listinfo/dev-apps-js-debugger