Using Venkman to debug javascript generated by JSP

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Venkman to debug javascript generated by JSP

Tech Stuff
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
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Using Venkman to debug javascript generated by JSP

John J Barton
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
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Using Venkman to debug javascript generated by JSP

Gijs Kruitbosch ("Hannibal")
In reply to this post by Tech Stuff
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
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Using Venkman to debug javascript generated by JSP

Tech Stuff
It worked!  Thanks so much Gijs.

-ts1971

--- On Wed, 7/22/09, Gijs Kruitbosch <[hidden email]> wrote:

From: Gijs Kruitbosch <[hidden email]>
Subject: Re: Using Venkman to debug javascript generated by JSP
To: [hidden email]
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
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger



     
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger