How to debug evaled JS in Chrome Dev Tools?

2,163 views
Skip to first unread message

jerzyg...@gmail.com

unread,
Nov 23, 2012, 7:47:29 AM11/23/12
to google-chrome-...@googlegroups.com
I have couple of questions about the latest Chrome Dev Tools:

1. How to debug an eval()-ed JS code in Dev Tools, e.g. that from Dean Edwards' Packer?

2. How to debug code inserted dynamically by JavaScript upon page load? I.e. document.write('<script>...</script>'); I cannot see any particular entry in Sources tab.

3. How to see the whole listenerBody, when I go to Elements tab -> select an element -> Event Listeners on the right pane -> click -> listenerBody? I can only see the truncated part of code and cannot select all.

Here is an example: http://niutech.github.com/typescript-compile/demo/demo.html - this script compiles TypeScript into JavaScript on load and inserts a <script> tag containing JavaScript code. This code runs, but it isn't seen in Sources tab, so I cannot set breakpoints.

fangju...@gmail.com

unread,
Nov 24, 2012, 8:29:28 AM11/24/12
to google-chrome-...@googlegroups.com, jerzyg...@gmail.com
I did a quick search and found something that might be helpful to you from Chrome Developer Tools Documentation: https://developers.google.com/chrome-developer-tools/docs/scripts-breakpoints#js_dynamic
Reply all
Reply to author
Forward
0 new messages