Python / VSCode: Learn if debugger is currently attached to a process #1526
Answered
by
int19h
LukasHeller
asked this question in
Q&A
-
I am using debugby to attach (and de-attach) a debugger in VS Code. I would like to let my Python script know, at runtime, if the debugger is currently attached. Is this possible? Thanks a lot for your help, Best regards, Lukas |
Beta Was this translation helpful? Give feedback.
Answered by
int19h
Feb 28, 2024
Replies: 1 comment 1 reply
-
If you can successfully |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LukasHeller
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you can successfully
import debugpy
(or better yet checksys.modules
so as to not import it if it's not there), and thendebugpy.is_client_connected()
returns True, then there is a client attached.