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
24
votes
2 answers

Setting up JS debugging with IntelliJ/WebStorm and PhantomJS/Casper

Can I get an interactive JS debugger working on PhantomJS and/or CasperJS?
21
votes
3 answers

Old debug session preventing debugging in chrome with vs code

When debugging in chrome using VS Code, I get the following warning from Chrome: It looks like a browser is already running from an old debug session. Please close it before trying to debug, otherwise VS Code may not be able to connect to it. I…
Metaman
  • 399
  • 1
  • 3
  • 12
19
votes
7 answers

How to check client-side JavaScript code for syntax errors?

I have some client-side JavaScript code and want to check that file for syntax errors/warnings. What is the easiest way to check my JavaScript file for "compile time" errors, such as a mismatched bracket or a keyword typo?
Steven Hammons
  • 1,774
  • 8
  • 24
  • 33
19
votes
2 answers

`Connection refused` in WebStorm NPM debug configuration

Bearing in mind that I have only the loosest understanding of what a debugger is really doing, I need help setting up the WebStorm npm debug configuration for an express.js application. Here's me so far-- I click debug with my settings as I think…
Ben
  • 4,980
  • 3
  • 43
  • 84
18
votes
3 answers

Disable function call to debugger in Chrome Developer Console

I am using Chrome's Developer Console to study the code of a page, but then the page has a javascript that calls the debugger. (function() { debugger }) And the page paused, then whenever I press the blue arrow to resume script execution another of…
18
votes
7 answers

Android Studio: Client not ready yet

While launching an app, I am getting a message " Client not ready yet". Also, my device is showing" Waiting for debugger to attach ", followed by "Unfortunately, android app has stopped working". I have tried every possible solution available on…
Aashi
  • 181
  • 1
  • 1
  • 4
18
votes
3 answers

How get value of variable that has been optimized out?

Some variables can be "optimized out" during Javascript execution. Thus values of such variables are not available for inspection while debugging (User documentation). Variables view shows (optimized away) message and console throws following error…
czerny
  • 15,090
  • 14
  • 68
  • 96
18
votes
1 answer

How to debug a specific JavaScript click event?

On yahoo weather page, there is link labelled as C that changes temperature unit from Fahrenheit to Celsius. I am looking debug this action and understand what JavaScript gets executed behind the scenes which convert F into C. What is the way of…
CuriousMind
  • 33,537
  • 28
  • 98
  • 137
17
votes
3 answers

Where is Chrome's debugger console command history stored?

I often use Chrome's debugger console for experimenting with javascript code fragments. When I got it right I usually want to copy the needed commands into my script, but here is where it gets messy. The is no filter options for commands and no way…
marlar
  • 3,858
  • 6
  • 37
  • 60
16
votes
4 answers

Chrome devtools inspector showing blank white screen while debugging with Samsung TV Tizen Web application

I'm debugging Samsung TV Tizen Web Application with Tizen Studio 3.6 and Google Chrome Version 80.0.3987.100 (Official Build) (64-bit). But Chrome Inspector showing black screen. Chrome path config : Chrome blank screen : Please help me out from…
13
votes
6 answers

How to debug Cucumber in Visual Studio Code (VSCode)?

I was trying to debug Cucumber scenarios in Visual Studio code and made below changes in the launch.json. { "name": "e2e", "type": "node", "request": "launch", "program":…
13
votes
3 answers

Disable the debugger statement through the browser

I am trying to style a piece of code that has the debugger keyword in it. I am using the debugging window(IE, FF, Opera) to see CSS style effects but the debugger is stopping every time I refresh the page(as it should). Can I toggle or disable the…
12
votes
3 answers

Enabling javascript debugger in VS 2022 freezes application

I have been searching for an answer for 2 days now so really hope someone can help. When I try to debug my project the application freezes, nothing happens in the browser it just keeps loading and there are no error messages. I realized that…
12
votes
2 answers

How to debug only one js file

I have lot of my JS files in my projects. Some of them are external libraries. I want to know what JS code is executing for current user interaction. I have set up break point in chrome as describe here. But there are already lots of JS files and…
Imad
  • 7,126
  • 12
  • 55
  • 112
10
votes
2 answers

How can I find where a JavaScript function is defined in Firefox Quantum's debugger?

If I know the name of a JavaScript function, or if I have a reference to a function (eg. in a callback) how can I find where that function is defined, when using the Firefox Quantum debugger. In Firebug/Firefox debugger I used to be able to type the…
stuporglue
  • 581
  • 1
  • 5
  • 12
1
2
3
24 25