google chrome devtools - How do I debug JavaScript written within a script tag in the HTML - Stack Overflow

I am attempting to debug external JavaScript within atag on an iframe on a website that I do not have

I am attempting to debug external JavaScript within a tag on an iframe on a website that I do not have access to the source code. I am able to debug all of the javascript files directly but not the javascript embedded within the HTML.

I have attempted to search for the code within the sources tab and I am unable to e up with it. I have attempted to use firefox developer edition as well as chrome dev tools

issue I am trying to debug:

<iframe>
   <html>
     <head>
       <script> javascript I want to debug </script>
     <body>
     </body>
   </html>
</iframe>

I would like to place breakpoints anywhere within the code to debug it.

I am attempting to debug external JavaScript within a tag on an iframe on a website that I do not have access to the source code. I am able to debug all of the javascript files directly but not the javascript embedded within the HTML.

I have attempted to search for the code within the sources tab and I am unable to e up with it. I have attempted to use firefox developer edition as well as chrome dev tools

issue I am trying to debug:

<iframe>
   <html>
     <head>
       <script> javascript I want to debug </script>
     <body>
     </body>
   </html>
</iframe>

I would like to place breakpoints anywhere within the code to debug it.
Share Improve this question asked Jul 28, 2019 at 13:14 RamiRami 5307 silver badges24 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

In Chrome's devtools:

  1. Open the Sources tab
  2. Click the Show Navigator icon if the navigator isn't already showing
  3. Find the name of the frame's HTML file in the navigator tree
  4. Expand it, which will show the domain the frame is from, then expand it again to find frame's HTML file (again)
  5. Click on that file to see its source
  6. Within the script, click in the line number gutter to the right of the line where you want to set a breakpoint

Just a picture to visualize what Crowder wrote above.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742355293a4428308.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信