Αυτός ο ιστότοπος θα έχει περιορισμένη λειτουργικότητα, όσο εκτελούμε εργασίες συντήρησης για να βελτιώσουμε την εμπειρία σας. Αν ένα άρθρο δεν επιλύει το ζήτημά σας και θέλετε να κάνετε μια ερώτηση, η κοινότητα υποστήριξής μας είναι έτοιμη να σας βοηθήσει στο Twitter (@FirefoxSupport) και στο Reddit (/r/firefox).

Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Μάθετε περισσότερα

How do I view and debug code in dynamically-loaded scripts?

  • 1 απάντηση
  • 2 έχουν αυτό το πρόβλημα
  • 1 προβολή
  • Τελευταία απάντηση από qschnehage

more options

I have a project in which HTML and JavaScript snippets are loaded via JQuery. These contain code which is then executed.

In Firefox and Firefox Developer Edition, how may I set breakpoints and debug this code?

I'm able to view this code by using the links provided when logging something to the console, but this only allows me to view the code. Any breakpoints I set are not valid when the script is run again.

I have a project in which HTML and JavaScript snippets are loaded via JQuery. These contain code which is then executed. In Firefox and Firefox Developer Edition, how may I set breakpoints and debug this code? I'm able to view this code by using the links provided when logging something to the console, but this only allows me to view the code. Any breakpoints I set are not valid when the script is run again.

Όλες οι απαντήσεις (1)

more options

Essentially, I'm looking for something that would allow me to do what Chrome does here:

http://stackoverflow.com/questions/1705952/is-possible-to-debug-dynamic-loading-javascript-by-some-debugger-like-webkit-fi https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints-dynamic-javascript

Adding a line of code "//# sourceURL=buildmodal-checkout-include.js" allows one to click through to the source in the debugger and set breakpoints.

If Firefox has a similar feature or way of doing this, Firefox will be the only browser I need for development work. (Aside from cross-browser stuff, of course) :)