Re: Trouble Getting Started

Gijs Kruitbosch <[email protected]> Mon, 10 Dec 2007 22:49:56 +0100
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
Steve wrote:
> On Dec 6, 6:28 pm, Gijs Kruitbosch <[email protected]>
> 
>> Hi Steve, thanks for the detailed feedback.
>>
>> Unfortunately I don't have the time to try to recreate the exact setup
>> you're describing (writing my own html file etc.) - if you can point us
>> to an example on the web, that would probably help.
> 
> Hi Gijs;
> 
> Are you a venkham developer?  If so, I can email you a copy of the
> html I saved from the JSP.
> 
> (snip informative piece about the workings of venkham )

Venkman developer, yes. Though part-time and very busy. ;-)

Please feel free to send me the html you saved. I will try to look at it 
  ASAP, which should be within a week's time.


>> Looking at it from the other end, do the following:
>>
>> 1. Open your browser and Venkman
>> 2. Open a random webpage with script in your webbrowser.
>> 3. Look for the associated file which has script in it, and open this in
>> venkman from the "loaded scripts" view by double-clicking it.
> 
> These steps were an improvement over what I tried but did not get me
> any further.
> 
> 
>> Then, as general advice: have you read Svendt Tofte's guide? (http://www.svendtofte.com/code/learning_venkman/) It's quite old by
>> now, but still a pretty good guide on how to get started with the debugger.
> 
> I wouldn't mind investing the time in doing that depending on the
> answers to these questions:
> 
> 1. Can Venkham debug javascript that is not housed in a *.js file ?

Yes.

> 2. Can Venkham debug javascript functions, where there is no top level
> function, just functions in response to javascript events, like
> onblur...as is the case with my example?

Yes. But if the code is on one line, you probably want to turn on pretty 
print (big flowery button on the right end of the toolbar).

The easiest way to make Venkman break somewhere in such code is probably 
to add a debugger; statement to your onblur function. Alternatively, 
doubleclick the right thing ("onblur" or whatever) on the loaded scripts 
pane with pretty print enabled should give you just that JS function 
(though decompiled, so comments, if any, will not be there).


> Since I was at work I managed to get microsoft interdev to do the job,
> but for various reasons I would like to use an OS deugger if it can
> handle my needs.
> 
> Let me if Venkham can do #1 & #2 above and/or get to the functions in
> the example page I can send by email.   If so, I will invest the time
> to read over that big tutorial carefully.
> 
> Thanks again for the good information.

You're welcome. Please let me know how things work out! :-)

Gijs