F
F
fandorin_official2018-02-14 06:40:18
JavaScript
fandorin_official, 2018-02-14 06:40:18

How can I track why the script stops?

All good.
The question is as follows. There is a certain script launched through Tampermonkey. And sometimes the script stops. Sometimes it can work for 12 hours without stopping, sometimes it stops 15 minutes after starting. How can I trace the reason for stopping the script?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2018-02-14
@fandorin_official

try {
  // ваш основной код
} catch (e) {
  // обработка ошибки. вывод в консоль, или запись в лог
}
https://developer.mozilla.org/en/docs/Web/JavaScript...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question