Home  >  Q&A  >  body text

javascript - How to break the js file that comes in asynchronously?

There is only one index.html page in my entire system, and the rest of the pages are requested through ajax. Each page fragment has a referenced script file, and the script path is written relative to index.html. path. But now I have a sub-fragment of js that may have a problem. I want to find the js break point for debugging. How should I do it?

某草草某草草2733 days ago749

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-19 10:41:40

    Break points in html

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-19 10:41:40

    Take Chrome as an example:

    1. Open Chrome and enter the local path of index.html

    2. Press "f12" to open the console

    3. Click "Sources" and find the corresponding .js file in the file path on the left

    1. Click on the line mark of the break point to display the blue mark

    1. Refresh the page and trigger the event

    reply
    0
  • Cancelreply