Javascript debug: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:


== Steps of troubleshooting ==
== Steps of troubleshooting ==
* Were the required js fils were included?
* Was the function was conflict with different js libraries? e.g. [https://stackoverflow.com/questions/41961708/uncaught-typeerror-tooltip-is-not-a-function javascript - Uncaught TypeError: $(...).tooltip is not a function - Stack Overflow]
* Checking the typo or "ensure that there are no compile-time errors"<ref>[https://stackoverflow.com/help/mcve How to create a Minimal, Complete, and Verifiable example - Help Center - Stack Overflow]</ref> by using [https://www.jslint.com/ JSLint] [[Javascript debug#tools | tools]].
* Checking the typo or "ensure that there are no compile-time errors"<ref>[https://stackoverflow.com/help/mcve How to create a Minimal, Complete, and Verifiable example - Help Center - Stack Overflow]</ref> by using [https://www.jslint.com/ JSLint] [[Javascript debug#tools | tools]].
* Verify the format of JSON file if the file was used by javascript by using [https://jsonlint.com/ JSONLint - The JSON Validator] tools.
* Verify the format of JSON file if the file was used by javascript by using [https://jsonlint.com/ JSONLint - The JSON Validator] tools.
* Disable the browser extension e.g. switch to '''incognito window''' on {{Chrome}}
* Disable the browser extension e.g. switch to '''incognito window''' on {{Chrome}}
* Quit the browser helper software e.g. video downloader
* Clear or disable the browser cache<ref>[https://www.java.com/zh_TW/download/help/webcache.xml 我要如何清除網頁瀏覽器快取?]</ref>
* Clear or disable the browser cache<ref>[https://www.java.com/zh_TW/download/help/webcache.xml 我要如何清除網頁瀏覽器快取?]</ref>
* Reload the webpage again
* Reload the webpage again
* Switch to different network environment
* Switch to different network environment


== methods / functions ==
== Methods / functions ==


Print message
Print message
Line 42: Line 53:




== references ==
== Further reading ==
* [https://errerrors.blogspot.com/2021/04/how-to-debug-javascript.html 怎樣對 JavaScript 進行偵錯]
 
== References ==
<references/>
<references/>



Latest revision as of 18:35, 14 February 2023

<< Testing: Javascript


Steps of troubleshooting[edit]

  • Were the required js fils were included?
  • Checking the typo or "ensure that there are no compile-time errors"[1] by using JSLint tools.
  • Disable the browser extension e.g. switch to incognito window on Chrome Browser chrome.png
  • Quit the browser helper software e.g. video downloader
  • Clear or disable the browser cache[2]
  • Reload the webpage again
  • Switch to different network environment

Methods / functions[edit]

Print message

DOM

Data type

Browser tool

Browser cache issue

tools[edit]


Further reading[edit]

References[edit]


Troubleshooting of ...

Template