- [Home page](https://www.brimit.com/)
- [Blog](https://www.brimit.com/blog)

# Dive into Sitecore CDP - Debugging tools

[#How-to](https://www.brimit.com/blog?categories=#How-to) [DXP](https://www.brimit.com/blog?platforms=DXP)
[Sergey Baranov](https://www.brimit.com/blog/author?authors=Sergey%20Baranov) on October 8, 2021

**Sitecore CDP** provides a lot of tools/options for debugging and in this articles I will show you best of them that I always use during development.

#### Access to user context information.

The easiest way to access to full user context information is to create empty decision model and click **Test Canvas** button.  Once **Test Canvas** tool is opening you just need to find user that you want to test and user information will be loaded automatically:![Sitecore CDP - Debug user context](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/2/decision_user_context.jpg)

Another way to do it is using *Postman* and **Batch API** of Sitecore CDP.

Before send any data to **Batch API** you need to setup **Authorization Basic** header for your requests. Otherwise you will receive an error:

```

{
    "status": 401,
    "code": 401,
    "message": "Authentication required.",
    "developerMessage": "Authentication with a valid API Key and API Secret is required.",
    "moreInfo": "mailto:support@boxever.com"
}

```

In your CDP account navigate to **System Settings -&gt; API Access** and copy **Client Key** and **API Token** values. You can generate valid auth header by using [this online tool](https://www.blitter.se/utils/basic-authentication-header-generator/), use **Client Key** as ***Username*** and **API Token** as ***Password***. Or you can generate it in your javascript yourself, basic auth pattern is:

```
(`${username}:${password}`).toString("base64")
```

See more information about athentification here: [https://developer.boxever.com/v2.0/reference/authentication](https://developer.boxever.com/v2.0/reference/authentication)

If you don`t know you current **Guest Id** value, you can find your Guest CDP-address by email with *GET* request to **https://api.boxever.com/v2/guests?email={user\_email}** endpoint with valid auth header: ![Sitecore CDP - Find user by email](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/3/search_by_email.png)

In response you will find link for your guest. If you hit *GET* request with Authorization header to this link you will get all information about your user *(the same as by using Test Canvas tool)*:![Sitecore CDP - Batch API](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/2/postman.jpg)

#### How to debug javascript?

Sirecore CDP has **print** function that is an analogue of **console.log** function of browsers: ![](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/2/print.jpg)

#### How to debug Decision model nodes?

By using **Test Canvas** tool you can execute your decision model in context of any user and look into **Full Response** tab where you find all information about your model execution and input/output values for each node:

![Sitecore CDP - Decision model response](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/2/response.jpg)

#### How to debug Web experiences and experiments?

**Sitecore CDP** provides awesome tool for Web experiences and experiments debugging. If you open **Build** tab, click **Preview** button, populate inputs with your website page (you can also optionally add context user) your website page will be opened and you will see **QA Tool** with all statistics and valdations. If something goes wrong during experience execution you will see detailed error in this tool:

![Sitecore CDP - Experience preview](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/2/experience.jpg)

![Sitecore CDP - QA Tool](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/2/qa_tool.jpg)

For detailed debugging of your web experience/experiment you can navigate to **Advanced Edit** section and use **Data** tab for execution your exrepience and have access to all entities. Alternatively  you can use **Preview API** button where you see the same but in JSON format:

![](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/2/experience_advanced_edit.jpg)

#### How to debug Triggered experiences and experiments?

The first question that you will most likely have when using Triggered experience/experiment is *"How can I access to context event (that I use as a trigger) in linked Decision model"*? This context event information is accessible in **entity** variable. So you can easy use **print(entity);** in your Decision model and then see in **Experience execution** logs format of this entity and use it as an example how to get corresponding field values in javascript. Alternatively you can see **entity** format in **flowExecutionRequestContext** variable in **Experience execution** content:

![Sitecore CDP - Triggered experience](https://www.brimit.com/-/media/project/brimit/blog/2021/x3mxray/2/triggered.jpg)

Here goes the table of contents for my Sitecore CDP blog series:

- [Introduction](https://www.brimit.com/blog/cdp-0-intruduction)
- [How to connect Sitecore CDP to website](https://www.brimit.com/blog/cdp-1-how-to-connect-to-website)
- Debugging tools
- [How to pass extended data to Sitecore CDP](https://www.brimit.com/blog/cdp-3-how-to-pass-extended-data-to-sitecore-cdp)
- [How to use Data System connections (Decision model with Content Hub products)](https://www.brimit.com/blog/cdp-5-how-to-use-data-system-connections)
- [How to use AI connections (Web experience with Azure Cognitive Services)](https://www.brimit.com/blog/cdp-4-how-to-use-ai-connections)
- [How to use Destination connections (Triggered experience webhook)](https://www.brimit.com/blog/cdp-6-how-to-use-destination-connections)
- How to use External service connections (Flows with External Service)
- Remarketing with Sitecore CDP and Facebook Ads

###### Author

![sergey-200](https://www.brimit.com/-/jssmedia/feature/blogs/authors/sergey-200.jpg?h=197&iar=0&w=200&hash=0D636570F87F1C13C39E06EB19D9DF06)

Sergey Baranov

Sitecore MVP/ Senior Sitecore Developer
[Sergey Baranov](https://www.brimit.com/blog/author?authors=Sergey%20Baranov)

###### More By Categories

[#Events](https://www.brimit.com/blog?categories=#Events) [#How-to](https://www.brimit.com/blog?categories=#How-to) [#News](https://www.brimit.com/blog?categories=#News) [#Guides](https://www.brimit.com/blog?categories=#Guides)

###### More by Platform

[Data and AI](https://www.brimit.com/blog?platforms=Data%20and%20AI) [DXP](https://www.brimit.com/blog?platforms=DXP) [E-commerce](https://www.brimit.com/blog?platforms=E-commerce) [Internet of Things](https://www.brimit.com/blog?platforms=Internet%20of%20Things) [Sales and marketing automation](https://www.brimit.com/blog?platforms=Sales%20and%20marketing%20automation)

#### More on Sitecore

![How Vercel Will Help You Save Effort When Deploying Sophisticated Sitecore Projects](https://www.brimit.com/-/jssmedia/project/brimit/blog/2024/vercel_cover-image.png)
#Guides #How-to DXP E-commerce

##### How Vercel Will Help You Save Effort When Deploying Sophisticated Sitecore Projects

Optimize and accelerate the development and deployment of complex multisite Sitecore projects.

Alexei Vershalovich on July 17, 2024
[How Vercel Will Help You Save Effort When Deploying Sophisticated Sitecore Projects](https://www.brimit.com/blog/how-vercel-will-help-you-save-effort-when-deploying-sophisticated-sitecore-projects)

![Training Up Tomorrow's Sitecore MVPs: a Mentoring Success Story](https://www.brimit.com/-/jssmedia/project/brimit/blog/2023/sitecore-mentoring---cover-image.png)
#How-to DXP

##### Training Up Tomorrow's Sitecore MVPs: a Mentoring Success Story

How to participate in the Sitecore Mentor program and help younger colleagues jump-start a career in Sitecore development.

Sergey Baranov on October 2, 2023
[Training Up Tomorrow's Sitecore MVPs: a Mentoring Success Story](https://www.brimit.com/blog/training-up-tomorrows-sitecore-mvps)

![Going Headless. Part 2: When a Headless CMS Is Your Best Bet (if you have Sitecore)](https://www.brimit.com/-/jssmedia/project/brimit/blog/2022/headless/adobestock_456986731.jpg)
#How-to DXP E-commerce

##### Going Headless. Part 2: When a Headless CMS Is Your Best Bet (if you have Sitecore)

Discover how a headless CMS can benefit organizations that use Sitecore.

Daniil Raschupkin, Palina Trokhautsava on September 15, 2022
[Going Headless. Part 2: When a Headless CMS Is Your Best Bet (if you have Sitecore)](https://www.brimit.com/blog/going-headless-part-2-when-a-headless-cms-is-your-best-bet-if-you-have-sitecore)
