The biggest help I found was adding the libraries at the top of the js file in 
VS, like:

 /// <reference 
path="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js"; />

Then the intellisense appears and you can guess the right setting about 80% of 
the time.



From: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Reply-To: ozDotNet <[email protected]<mailto:[email protected]>>
Date: Tuesday, 9 July 2013 1:38 PM
To: ozDotNet <[email protected]<mailto:[email protected]>>
Subject: Re: jQuery debugging

Thank chaps, I'll have to look into Chrome, although I've never previously 
allowed it only my work machines because it's like a virus, everything from 
Google is like a virus.

I would like to mention that in the previous hour I've been cobbling together 
my price-calc html page, I have needed to run a web search on how to code each 
individual line: set and get a checkbox, detect textbox changes, disable a 
control, set text in a span, etc. all absolutely fundamental things you need to 
do. The inconsistency and patternless quagmire is beyond human endurance. Did 
the inventors of JavaScript, jQuery and DOM invent this stuff to hamper the 
progress of the human race? The inventors of this mess should be hunted down if 
they're still alive and strangled with their own entrails. Examples that need a 
search for each line and I find absolutely no consistency at all (the first one 
is utterly cryptic):

Is a checkbox checked -- $('chk1').is(':checked')
Set text in a span -- $('#span1').text(thevalue)
Set text in a textbox -- $('$text1').val(something)
Disable a control -- $('radio1').attr('disabled', show)

Even worse, most search results have screenloads of people arguing about what 
bit of sample code is correct. There are sometimes 6 suggestions of how to do a 
single thing, and 4 of them don't work. The official jQuery API server is 
offline which makes my experience even better. I'm sure I'll feel better once I 
can see some sort of pattern in the jQuery/DOM chaos.

Greg K

On 9 July 2013 13:04, Jorke Odolphi <[email protected]<mailto:[email protected]>> 
wrote:
Chrome has by far the best debugging experience – very similar to how it works 
with .net – and its the same experience on each platform - (although osx makes 
you do unnatural acts with key combinations). I've found I've been writing code 
on the console to validate it, and its super easy for debugging ajax as well. 
Some very nice profiling things there as well – really lets you tune the 
rendering etc.

I tried the tool chaining with VS and it was just too hard to make it work, 
although I do rate VS as the best JS editor (before sublime :) )


From: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Reply-To: ozDotNet <[email protected]<mailto:[email protected]>>
Date: Tuesday, 9 July 2013 12:31 PM
To: ozDotNet <[email protected]<mailto:[email protected]>>
Subject: jQuery debugging

I'm trying to create a single html page with jQuery inside to interactively 
calculate a price total based upon the settings of other controls. It's a 
classic sort of "make you order" page.

Can I get a familiar debugging experience like I'm used into in Visual Studio 
while writing this page and scripts? I haven't written any JavaScript for years 
and I have no idea what's available to help me these days. There must be some 
people in this group writing plain JavaScript or jQuery in their html pages, so 
what do you do to keep productive?

Greg K


Reply via email to