This topic is locked
[SOLVED]

 finding java script issues

9/18/2020 12:42:13 AM
ASPRunner.NET General questions
H
heilmanmd author

I watched the new blog on java script errors...
nice...
that said, here's my experience on those next to find impossible java script errors nobody wants to talk about

1 on the list

java script event doesn't work, kaput, nada not even having the first line of alert("hello world"); works..

first thing to do... make sure all your variable names match all the way thru and thru

java script is horrible at this, no way to find but to copy to your favorite editor and start searching / matching...



case in point mis-spell a variable, tough, really tough to find.. unless you know that you 've only touched one place since last compile

read on down about project back up files and how often... will save your bacon...

2 on the list



java script event doesn't work, kaput, nada

well guess what, it probably will work, you just gotta go find the java script that doesn't pass muster

i.e. do the code check on all of em, unless of course you know what you've touched recently, that helps a little
above two issues are bears to find if you are hacking away like made and come up short...
been there got that T shirt, using prior revisions in the code base may help... but... you gotta know where you've been working, etc...

long days, that might not be good
so... my favorite solution... make a back up of the project file, often, really often, like every 10 mins if on a big project with lots of pages often...

will save you lots of heartaches as you can go back and only lose 10 /20 / 30 mins of work and get back to a good working point

cause finding the above two issues is tough really tough
If someone has experience on other ways to find the above two issue, let me know
Hope this helps someone...
Best

Mark

Pete K 9/19/2020

Thanks for the additional pointers, Mark. With regard to your second point, here's a very easy method I use to quickly find recent code that has broken. This works for any code in your project, whether Javascript or C#. Just look at the revisions! ASPR keeps track of all revisions to your code. You can quickly see what has changed by comparing the latest version with a prior one.
If there are a lot of differences between the versions I want to compare, I like to copy and paste each version into a comparison tool like WinMerge to view them side-by-side with the changes highlighted.

H
heilmanmd author 9/21/2020

Thanks for the pointer... ASP runner version histories are a life saver for sure, I use then religiously ...

admin 9/22/2020

I will just post the link to this video here:

https://www.youtube.com/watch?v=o5o18eawWpE&t=6s
I'm surprised so few people watched it. This is probably the most useful troubleshooting technique that I personally use every single day.