Skip to content

Any method to debug python code call by pybind11 from c++? #1258

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

You must be logged in to vote

It does, but you won't be able to use the launch (F5) workflow. You'll need to attach the client to your process using attach-to-PID or attach-to-port. If you have control over the Python code that runs in your host process and can import debugpy and use its API there to set up the debug server, attach-to-port will generally work more reliably:
https://code.visualstudio.com/docs/python/debugging#_debugging-by-attaching-over-a-network-connection

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zeroxer
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
Converted from issue

This discussion was converted from issue #1255 on April 03, 2023 19:15.