There are several ways to get more debug info from Prebid Server.
If you’re invoking Prebid Server directly, add one of these parameters to the OpenRTB:
"test":1
: This will inform bidders that this request should be treated as a test (non-billable), and provides additional debug information in the OpenRTB response."ext.prebid.debug":true
: Similar to test
, but just adds debug info, without declaring the request non-billable.POST https://prebid-server.rubiconproject.com/openrtb2/auction
{
...
"test":1
}
If you’re invoking Prebid Server from Prebid.js, turn on the OpenRTB test
flag from Prebid.js using one of these options:
Add ?pbjs_debug=true to the URL of the page. This will cause the pbsBidAdapter to send ext.prebid.debug:true
to PBS, which will turn on additional debugging.
Add the following setConfig
to the page to get the same result:
pbjs.setConfig({"debug":true});
If instead of ext.prebid.debug you would like to set the OpenRTB 2.5 ‘test’ flag, you can set that using the ‘ortb2’ approach:
pbjs.setConfig({
"ortb2": {
"test":1
}
});
If you’re invoking Prebid Server from AMP, you’ll be unable to get debug info from the AMP page. However, you can capture the Prebid Server AMP call and append &debug=1
to it:
https://my-prebid-server.com/openrtb2/amp?tag_id=1111111111111&w=300&h=50&...&debug=1
Sometimes it’s hard to get a test bid. Other times, you may want to test a very specific bid, such as one that has a particular CPM value or creative.
The Prebid Server ‘stored response’ feature allows you to handcraft bid responses in two basic steps:
Getting a Stored Auction Response ID into the OpenRTB can be done in two ways:
A storedauctionresponse
ID can be specified in imp[].ext.prebid
. If specified, then the behavior of Prebid Server changes:
So for example, this OpenRTB request:
{
"test":1,
"tmax":500,
"id": "test-auction-id",
"app": { ... },
"ext": {
"prebid": {
"targeting": {},
"cache": { "bids": {} }
}
},
"imp": [
{
"id": "a",
"ext": { "prebid": { "storedauctionresponse": { "id": "1111111111" } } }
},
{
"id": "b",
"ext": { "prebid": { "storedauctionresponse": { "id": "2222222222" } } }
}
]
}
Could result in this response, assuming that the IDs exist in the database table read by Prebid Server:
{
"id": "test-auction-id",
"seatbid": [
{
// BidderA bids from storedauctionresponse=1111111111
// BidderA bids from storedauctionresponse=2222222222
},
{
// BidderB bids from storedauctionresponse=1111111111
// BidderB bids from storedauctionresponse=2222222222
}
]
}
(PBS-Java only)
Sometimes you want to see what’s coming into the server before being processed by PBS. If the admin endpoints are enabled and you have the admin endpoint password, you can hit these two URLs with the desired parameter values:
https://HOST/logging/[changelevel](/prebid-server/endpoints/pbs-endpoint-admin.html#loggingchangelevel)?level=debug&duration=10000
https://HOST/logging/[httpinteraction](/prebid-server/endpoints/pbs-endpoint-admin.html#logginghttpinteraction)?limit=100&endpoint=auction&account=1111
Then you can check server logs for output like:
http-interaction : Requested URL: "/openrtb2/auction", request body: "{ ... }"