how to test if script is actually in debug mode (to disable timeouts) #1011
Unanswered
ugur-kurnaz
asked this question in
Q&A
Replies: 2 comments
-
I usually use this: |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Is there any instruction that could be used by script to check if debug is enabled? for example, one would like to add timeout to running code. But when debugging those timeouts are a bit troublesome. Rather than modifying timeouts in hard (that may be calculated during runtime), is there a way to check that there is a debugger running like :
`
class Job
MIN_TIMEOUT = 10
MAX_TIMEOUT = 30
def initialize
@timeout = <is_debug_enabled> ? nil : MAX_TIMEOUT
@memory = nil
@Result = nil
@error = []
end
end
`
thank you for your help
Beta Was this translation helpful? Give feedback.
All reactions