iw.debug package
What is iw.debug
This package allow you to start the ipython debugger (ipdb) on any objects in zope. For that you have to add /ipdb to the url of any object. And if your zope instance is in debug mode it will start the ipdb in your terminal.
Exploring objects
Run your zope instance in foreground:
./bin/zopectl fg
Call an url ended with /ipdb:
wget http://localhost:8080/portal/ipdb
Then you get ipdb prompt in your console:
ipdb>
Typing ll will show you a few locals:
ipdb> ll
Out[0]:
{'context': <PloneSite at /portal>,
'meth': None,
'portal': <PloneSite at /portal>,
'request': <HTTPRequest, URL=http://localhost:8080/portal/ipdb/pdb>,
'view': None}
Debuging objects views and methods
You can also use a query string in the url to debug a callable:
wget http://localhost:8080/portal/ipdb?v=__repr__
Then back to your console:
ipdb> ll
Out[0]:
{'context': <PloneSite at /portal>,
'meth': <bound method PloneSite.__repr__ of <PloneSite at /portal>>,
'portal': <PloneSite at /portal>,
'request': <HTTPRequest, URL=http://localhost:8080/portal/ipdb/pdb>,
'view': None}
If a browser view is found, then it will be used as callable:
wget http://localhost:8080/portal/ipdb?v=rules-controlpanel
Then back to your console:
ipdb> ll
ipdb> Out[0]:
{'context': <PloneSite at /portal>,
'meth': None,
'portal': <PloneSite at /portal>,
'request': <HTTPRequest, URL=http://localhost:8080/portal/ipdb/pdb>,
'view': <Products.Five.metaclass.ContentRulesControlPanel object at ...>}
For both view and callable, you can enter in it by typing s:
ipdb> s
ipdb> --Call--
> /../plone/app/contentrules/browser/controlpanel.py(18)__call__()
17
---> 18 def __call__(self):
19 form = self.request.form
If you want to pass extra args to the callable do something like:
wget http://localhost:8080/portal/ipdb?v=myview&arg1=value1&arg2:int=2
Extra args will be passed to the callable as keyword arguments.
Add iw.debug to your plone3 buildout
In the [buildout] section of your buildout.cfg add:
[buildout] ... # Add additional eggs here # elementtree is required by Plone eggs = elementtree iw.debug ...
Then in the [instance] section:
[instance]
...
# If you want to register ZCML slugs for any packages, list them here.
# e.g. zcml = my.package my.other.package
zcml = iw.debug
...
Metadata
Release files for iw.debug 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iw.debug-0.3.tar.gz | 4.2 kB | Without provenance | Details for iw.debug-0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iw.debug-0.3-py2.4.egg | Legacy Egg format | - | - | Details for iw.debug-0.3-py2.4.egg |
Total release size: 13.4 kB
Release files / iw.debug-0.3.tar.gz
| Download URL | iw.debug-0.3.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9260e4365d72cc9eaacab3376927351852cff66efcf72538589d34eb39a07cd
|
|
BLAKE2b-256 checksum How to use checksums |
b2f56ec890568dbe4d6282e3c11a41bf2c92ac7e1f2f8c262ddee5dc7fe251db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / iw.debug-0.3-py2.4.egg
| Download URL | iw.debug-0.3-py2.4.egg |
|---|---|
| Size | 9.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
f07c052bc43e60edfa2c0d5a3a357d6637d2938ba37005e39a9c97b148ea9c85
|
|
BLAKE2b-256 checksum How to use checksums |
90e21f9ad774fff6f010c1a040a7fe0a5077e4d7b56b1d1c41094ca15e02d4c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for iw.debug 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.