how to debug javascript step by step without dropping into compiled code or setting up breakpoints on each line

McAninch, Robin 51 Reputation points
2023-12-30T23:15:18.5733333+00:00

I used to be able to in options set "enable script debugging" and when I ran Visual Studio I would start debugging and then the code would stop on a breakpoint. I could then use F10 and F11 to step the code without going into minified jquery libraries and keep moving without needing a breakpoint on each line. I can't do that now. I know how to launch the debugging tools but if I set a breakpoint in the source now I can't seem to step through it and I need to set breakpoints at each line and hope. In the case of REACT I seem to end up in the REACT minified code every time I try. There has to be a better way. Any help would be great. Thank you

Developer technologies Visual Studio Debugging
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2024-01-01T07:08:26.6933333+00:00

    Hello @McAninch, Robin,

    Welcome to Microsoft Q&A forum.

    Does using debugger meet your requirements? For example

    debugger
    function XXXXX() {
        ...
    }
    

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.