V
V
VanilaSpirit2020-08-31 12:28:41
JavaScript
VanilaSpirit, 2020-08-31 12:28:41

ASP.NET how to find out which JS script is currently executing?

In large projects, different parts of one script can be scattered anywhere (in the view itself, general js, header, etc.) and constantly looking for them is such a thing.
Is it possible to somehow simplify the search process in VS itself, or in the browser?
For I take the name of the class and run it through the search - where it finds the script - there I look - whether that part of it is being executed, I think it is very long and can be done much faster.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor P., 2020-09-10
@Jeer

you can write the word debugger in js where you want the breakpoint. Then, when tools are enabled (f12 in chrome), execution will automatically stop on this line. You don't have to look for anything.
In general, your question does not apply to asp.net, only to studio.
There are other things, for example, you can right-click on the function and "find all links", but in the studio this only works for js files, it does not search if the call is from html.
In general, try switching to Angular/React. As you understand the structure, all your functions will be in one place, you won’t have to look for anything.
Working with js / html is better implemented in PHPStorm than in visual studio, now I am writing the backend on .net in VS, and the front end in storm (angular project)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question