First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

Debugging the Python code during PSSe dynamic simulation

asked Apr 14 '15

Sarina gravatar image

Dear all,

I need to debug the Python code during the runtime of Psse dynamic simulation to check the values in the variables that I have used and also to see the flow of the program that I have written. Could anyone please help with a way to do this?

Thank you in advance

Comments

''pdb.set_trace()'' may work. It may not work depending how your output is being redirected.

chip gravatar imagechip (Apr 16 '15)

Thank you for your answers. Yes, I figured out that pdb.set_trace() works well if you want to do line by line debug. Also, print command helps a lot. But Does anyone know of a way to send the control to for example the next breakpoint as we do in Matlab? Please suggest.

Sarina gravatar imageSarina (Apr 16 '15)

pdb is a full debugger, you can set breakpoints. If you want a pretty IDE give PyCharm or Spyder a try. If you go the Spyder route, I recommend you get it via PythonXY.

chip gravatar imagechip (Apr 22 '15)

1 answer

Sort by » oldest newest most voted
0

answered Apr 16 '15

jconto gravatar image

If you post your code, comment & additions can be added to it. For most of my code debbuging and monitoring, I used the print command at suitable locations to monitor variables value as needed.

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

2 followers

Stats

Asked: Apr 14 '15

Seen: 1,098 times

Last updated: Apr 15 '15