简体   繁体   中英

Copy javascript error text to clipboard?

How do you copy javascript errors in IE to clipboard? CTRL + C doesn't work and I don't want to take screenshots. Are there any tools out there that lets you copy the text?

替代文字

(ANSWER) EDIT: I finally found a machine which has IE8 on it and was able to copy the error message. It's a hassle, though.

If you were using IE8+ there is a new button called Copy error details to clipboard.

IE7 or older, have done everything that is "easy", "de facto", "cultural" to something else, just to get your job harder.

IE allows you to use the method window.clipboardData.getData() to programatically copy data. I guess you could use this in a try/catch statement. But you will have to set permissions to use it, and it will only work in IE.

These error messages in IE6/7 are rarely useful anyways, it's better to describe what you were doing when you experienced the error on which page. Because IE gives vague error messages and likes to concatenate all the javascript files together any line number that would have pointed to actual source of the problem is practically lost. Whomever is fixing the javascript is going to have to go through some grueling line by line medival debugging.

Edit: That is if the problem doesn't present in IE8, if it's present in IE8 as well, you have much better options.

Try `Ctrl + C' to copy. It works in windows' alerts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM