Ask Your Question

View variables in imported module

asked 2018-12-18 14:25:00 -0500

iainrs gravatar image

updated 2019-03-13 10:24:59 -0500

I'm importing a module containing control variables for a program and I wonder whether there is a way of interrogating them at a breakpoint (as with 'Stack Data')

from pgvars import Pgvars as pgv
if pgv.value_1 == 'A':
    pgv.Value_2 = '123'
    pgv.value_2 = 'abc'
if pgv.value_2 == 'abc'    # breakpoint

at the breakpoint I can display the individual variables in 'debug probe'.

Is there a way of viewing all variables in 'pgv' ?

I feel that this is an elementary question but can't find an answer.

I'm running Python 3.5 on Xubuntu 18.04 using Wing Pro

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-12-18 14:53:00 -0500

There is a Modules tool in the Tools menu that lets you browse data in the same way as Stack Data but starting from sys.modules.  Or, right click on pgv in the editor and select "Watch 'pgv' in Debugger" and then expand it from there.  In the Debug Probe you could also type pgv.dict if pgv is an instance.  That won't work if it's a module, though.

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

Question Tools



Asked: 2018-12-18 14:25:00 -0500

Seen: 11 times

Last updated: Mar 06