N
N
Norum2021-03-15 01:39:25
JavaScript
Norum, 2021-03-15 01:39:25

How to see the script step by step in the debugger?

How can I track the work of the script so that it shows me step by step and clearly how it works?
First I set breakpoints
604e8fafc4015347086292.jpeg

Then I refresh the page I step through
604e900bca704121424676.jpeg

the code and then it exits into another script file? Why? I set breakpoints in one script file, and it goes into another
604e909b54037524980905.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AUser0, 2021-03-15
@AUser0

So you're asking JavaScript to "execute the current one and show the next command", so it jumps to the first command of the jquery.on() function, which is described in the jquery-latest.min.js file.
There, in the management console, in addition to the button "execute the current and show the next command", there is also a button "execute the entire function (without going inside), and show the command following the function" ...
PS Or put breakpoints not on the function declaration , but on commands inside it.

C
CityCat4, 2021-03-15
@CityCat4

All debuggers usually have Step into and Step over commands, that is, "Step in" and "Step through". They differ in call handling - in the first case, the debugger will load the called module and stop at its first command, in the second case, it will execute the call without tracing and stop at the first command after the call.
The first one usually catches the entrance to a falling or not debugged procedure, the second - they bypass the already debugged ones. Apparently, you gave the first command instead of the second :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question