Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
rpdb is a wrapper around pdb that re-routes stdin and stdout to a socket handler. By default it opens the debugger on port 4444::
import rpdb; rpdb.set_trace()
But you can change that by simply instantiating Rpdb manually::
import rpdb
debugger = rpdb.Rpdb(port=12345)
debugger.set_trace()
It is known to work on Jython 2.5 to 2.7, Python 2.5 to 3.1. It was written originally for Jython since this is pretty much the only way to debug it when running it on Tomcat.
Upon reaching set_trace()
, your script will "hang" and the only way to get it
to continue is to access rpdb using telnet, netcat, etc..::
nc 127.0.0.1 4444
pip install rpdb
For a quick, ad hoc alternative, you can copy the entire rpdb subdirectory (the directory directly containing the init.py file) to somewhere on your $PYTHONPATH.
Just copy the rpdb directory (the one with the init.py file) in your WEB-INF/lib/Lib folder along with the standard Jython library (required).
set_trace()
can be triggered at any time by using the TRAP signal handler.
This allows you to debug a running process independantly of a specific failure
or breakpoint::
import rpdb
rpdb.handle_trap()
# As with set_trace, you can optionally specify addr and port
rpdb.handle_trap("0.0.0.0", 54321)
Calling handle_trap
will overwrite the existing handler for SIGTRAP if one has
already been defined in your application.
Bertrand Janin b@janin.com - http://tamentis.com/
With contributions from (chronological, latest first):
This is inspired by:
Initial release.
FAQs
pdb wrapper with remote access via tcp socket
We found that rpdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.