Re: Debug JavaScript for Developer

Isaac Porat


I use the Browser console in Firefox.

Press Ctrl + Shift + j to get there (you might have to enable development tools to do this, I can't remember).

After the first time you launch Firefox press Alt + r to remove initial warnnings / errors. Then tab to the desired page and press f5 to reload.

I use console.log to debug in my code.

I found the Web console tool more difficult to use as the errors are on the same page and I found it not reliable to navigate easily back to the actual document part of the page.

As you said the dbugging facilities in firefox are not usable.

I usually live the browser running, change the code in the page I want to debug, reload the page with f5 tab to the Browser console and it works reasonably well (I don't like using a debugger anyway).

For javascript code that does not use the DOM like perhaps some calculation, I use the node.js framework and debug from the command line.

I am going to give it a go with Visual Studio, not for javascript but for TypeScript which suits what I want to do better.

I hope the above is useful.



On 15/02/2018 21:01, Oleksandr Gryshchenko wrote:
Hello friends!

Antony Stone wrote:
Er, what is the question / problem / issue?
Antony, I'm sorry that I didn't explain the essence of the question.

I need to debug the JavaScript code of some websites, add breackpoint and inspect a variables or objects.
I've tried embedded Google Developer Tools in Chrome, Firefox and Internet Explorer integrated ones.
But all these tools are not accessible, or poorly  (little) accessible with all screen readers.
I'm looking for a solution to this problem and ask for help from more experienced members of this group.

特種兵 wrote:
I use alert debug my javascript
call this file in page when you need
Thank you, 特種兵.
This is an interesting and very simple solution and I will use it.

Good luck to all!

Join to automatically receive all group messages.