Skip to content

Python / VSCode: Learn if debugger is currently attached to a process #1526

Answered by int19h
LukasHeller asked this question in Q&A
Discussion options

You must be logged in to vote

If you can successfully import debugpy (or better yet check sys.modules so as to not import it if it's not there), and then debugpy.is_client_connected() returns True, then there is a client attached.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LukasHeller
Comment options

Answer selected by LukasHeller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants