Questions tagged [javascript-debugger]

JavaScript debugger are tools that let you debug your JavaScript code by pausing the execution at any time, step through the code and see what each variable available looks like at that moment.

JavaScript debuggers allow step debugging of JavaScript code. Using them you can set breakpoints within the code. When a line of code is executed, which has a breakpoint set for it, the execution stops at that line and allows to execute the code step by step.

While stepping through the code the debugger displays all variables available within the current stack frame and typically also allows you to set some watch expressions.

As one of the main use cases for JavaScript are web browsers, different browsers have integrated tools to debug JavaScript. These tools are:

Furthermore IDE's like NetBeans or Eclipse also include debuggers for JavaScript.

See also

370 questions
6
votes
2 answers

How to debug a Thunderbird addon/extension's JavaScript

I want to develop a Thunderbird 12 addon. I have written a simple JS function. (File: "chrome\content\myApp.js"). This file is called by a xul-'onclick'-event. I have packed my addon as a .xpi file and then I have installed it. (All ok, it's…
5
votes
2 answers

How to get to sandboxed environment of content script in Chrome JS console

If I open up the JavaScript console in Chrome Developer Tools to debug my extension's content scripts, I don't get the context of the content scripts. For example, jQuery isn't accessible, and I can't get access to my global variables unless I go…
5
votes
3 answers

How to find out if there is Javascript code that is listening to keyboard events?

How can I find out if there is Javascript code listening/intercepting keyboard events and ideally find the exact line/location in the code (e.g. in ChromeDev Tools)?
Yolgie
  • 268
  • 3
  • 16
5
votes
2 answers

See all loaded .js files in Google Chrome debugger tool

How can I see all .js files which were downloaded while showing my web page? I am using Network for it, but over time it stops showing .js files which were downloaded.
user7474176
5
votes
2 answers

Any way to pin or bookmark a Javascript source file for easy access from the Chrome debugger?

I am debugging a Javascript file that is deeply nested in the source tree. The URLs I have to drill down through are extremely hard to memorize since the JS source I want is loaded inside an iFrame that has been loaded by an Add-In API. Is there…
5
votes
1 answer

Firefox Developer edition missing add watch functionality

After update to 52.0a2 and i am not able at javascript debugger create my own expressions, add watch etc. When i right click some variable i used to just select from context menu "add text to watch expression", but in newest version its missing. Do…
5
votes
1 answer

Troubleshooting Uncaught RangeError: Maximum call stack size exceeded

I am getting this error only in Safari and Chrome on Mac machine, but can't reproduce on other browsers nor on Windows. The main problem - there is no information on what function caused the issue. No stack trace with most recent calls before the…
Serhiy
  • 4,357
  • 5
  • 37
  • 53
5
votes
2 answers

Javascript debug in Firefox: how to show the stack of calls with error

I am doing a web application. In Firefox, I am able to use Web Developer's Debugger tool. In my Javascript code, I got the error in Firefox TypeError: a is undefined The above error happened in jQuery. I know that the data I pass to jQuery is not…
curious1
  • 14,155
  • 37
  • 130
  • 231
5
votes
2 answers

Firefox debugger jumps from an if-block directly to an else-block

I'm wondering how the sequence shown below could possibly occur. Here is the function in question: WebSocketConnector.prototype.sendMessage = function(message) { if (socket !== null) { socket.send(message); console.log('Sent: ' +…
devuxer
  • 41,681
  • 47
  • 180
  • 292
5
votes
2 answers

How to make JavaScript break into IE built-in debugger (F12) rather than Visual Studio debugger?

I often use this to debug JavaScript in IE (fiddle): if (confirm("Debug from here?")) debugger; If I choose "yes", I see the prompt to start Visual Studio just-in-time debugger, which I proceed with to debug the script in Visual Studio. Now I…
5
votes
1 answer

VS2012 JavaScript debugger does not get my changes

I'm debugging a JavaScript function in a web application using Visual Studio 2012. After I edit the file, when the application is run, it doesn't use my modified version. Instead it uses the old, outdated version. If I set a breakpoint in the…
5
votes
1 answer

IE9 debugger - On the "Script" tab, what are the scripts in the "Others" section when you are debugging?

They are usually named "Script Block (#)" with the pound sign being an arbitrary number but I've also seen blank html docs (html and body tags only) in the "Others" section as well. To be more specific, the "Others" section I'm referring to can be…
Brandon
  • 1,566
  • 2
  • 14
  • 22
5
votes
4 answers

Debugging on-launch Javascript in UIWebView

I'm currently debugging a webpage which is embedded in a UIWebView for display in the app. It uses some elaborate on-load Javascript which works fine in the Android app but breaks in the iOS app. This answer pointed me to Safari Web Inspector for…
Arkaaito
  • 7,347
  • 3
  • 39
  • 56
5
votes
1 answer

Does the JS debugger suspend the whole JS event loop?

I've got some very odd behaviour going on. I have the following JQuery: myElement.fadeOut(100); There is some kind of race condition going on, such that the element doesn't end up getting hidden. If I put a debugger on that line and step through…
Joe
  • 46,419
  • 33
  • 155
  • 245
5
votes
5 answers

Bug in console.log?

Possible Duplicate: Is Chrome's JavaScript console lazy about evaluating arrays? I try the following code: var myList = new Object(); var item = new Object(); item.text = "item-1"; myList[3] =…
guyaloni
  • 4,972
  • 5
  • 52
  • 92