3

How can i watch global pointer variable root in Visual Studio Code?

Here is the sample:

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "pch.h"
#include <iostream>

struct node
{
    int data;
    struct node *link;
};

struct node *root;
1
  • 4
    Add a watch on it? Commented Dec 8, 2018 at 10:55

1 Answer 1

3

enter debug mode (F5)

Add variable to watch (Right click on *root - Add to watch)

value will be shown in watch window during debug execution

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.