Debugging Python script running in an embedded interpreter

已回答

I have an interactive windows desktop application written in C#/C++ that supports Python scripting. The Python interpreter is launched by the application when I "Play Macro"

As a PyCharm newbie...... how can I configure PyCharm to debug a Python script that is being executed in the embedded interpreter?

I've got WinPDB running using remote debugging - but I'd rather use PyCharm.

Is the PyCharm remote debugger option the way to go here?

If so, there seems to be two approaches - "Remote Interpreter" and "Debug Server" - any guidance on which one is likely to work best?

 

Thanx in advance for any help you can provide - and if moreinfo is needed I'm happy ot provide it.

 

Doug

 

 

 

 

0
正式评论

Hello! It looks like in your case you can use either "Remote Debug Server" or "Attach to local process". You can't use Remote Interpreter, because in this case you need to create Python run configuration, i.e. pass your Python file directly to Python interpreter, but according to your description, it isn't possible. 
Both these options will give you an opportunity to debug your file, but I recommend to use Remote Debug Server, because it's less platform dependent and more stable. I believe the best solution is to try both of them and select which one you prefer.

请先登录再写评论。