Ask Your Question
0

Debugging the Python code during PSSe dynamic simulation

asked 2015-04-14 13:59:40 -0600

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

edit retag flag offensive close merge delete

Comments

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

chip gravatar imagechip ( 2015-04-15 21:02:23 -0600 )edit

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 ( 2015-04-16 15:35:34 -0600 )edit

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 ( 2015-04-22 17:51:31 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-04-15 20:50:02 -0600

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

2 followers

Stats

Asked: 2015-04-14 13:59:40 -0600

Seen: 1,093 times

Last updated: Apr 15 '15