Getting Started with CodeBull
Follow this step-by-step guide to master dynamic instrumentation in VS Code.
Installation
Search for "CodeBull" in the VS Code Marketplace and click Install. Ensure you have a Go project open.
Add the following import to your Go project:
import (
_ "github.com/0xbu11/codebull"
)
Server Configuration
The listen address can be configured in three ways:
- Call
shadow.Start(addr)with an explicit address (for example,:9000or127.0.0.1:9000). - Set
EGO_SHADOW_ADDR(full listen address). - Set
EGO_SHADOW_PORT(port only, for example,9000).
Priority is:
shadow.Start(addr) (explicit addr) > EGO_SHADOW_ADDR >
EGO_SHADOW_PORT > default :8888.
Notes:
EGO_SHADOW_PORTmust be a valid numeric port (1-65535), otherwise it falls back to:8888.EGO_SHADOW_ADDRcan be either127.0.0.1:9000or:9000.
- Base URL:
http://localhost:8888 - WebSocket URL:
ws://localhost:8888
Injecting Logs
Open any Go file. You will see CodeLens actions above your functions or lines. Click "Set Log" to inject a log point. The IDE will automatically track the next execution.
Viewing Live Logs
Open the CodeBull Log panel. As your application runs, logs will stream in real-time without you having to rebuild or restart your app.
Visualizing Metrics
Click "Set Metric" via CodeLens. Select a variable to track. Open the CodeBull Metric panel to see real-time graphs of the variable's value over time.
