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.
Run the command awdb-server
to start a server for debugging. The webserver runs on port 8080 by
default. It will listen for websocket connections on path /ws.
In order to use the debugger, you can use the
The set_trace
method can be defined in PYTHONBREAKPOINT environment variable as such
PYTHONBREAKPOINT=awdb.set_trace
Then in the code you can invoke the debugger using the breakpoint
native method.
print(1)
breakpoint()
call_method()
set_trace
Like usual debugger in python, you can invoke it using the following code snippet.
import awdb; awdb.set_trace()
The debugger creates a thread with an async loop to communicate with the websocket server. So the python application must be able to connect to the debugger server.
For each thread being debugged, a thread will be spawned with a websocket client. Each thread can send asynchronuously messages to the server on their individual message loop.
The communication with the main thread is achieved using Queues.
When connected to the server, the Websocket client more or less act as a slave and wait for messages.
The control of the process start in the thread where it can be configured then moves into the frame trace method. It will block the thread in a loop that send/receives messages from the async thread.
The design allow us to continue debugging while being able to eventually interrupt the debugging session. Without having to reuse a breakpoint or even place any breakpoint.
Debugging can be achieved by using the awdb-client program. it will connect to the server and provide a simple terminal user interface. There are few commands such as
Since it's using websocket, it's technically possible to run the client directly in the browser in a single page application. The websocket protocol is the only requirement to be able to debug an application.
Those are environment variables useful to configure the servers/client/traced app
FAQs
WebSocket Debugger
We found that awdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.