How to read Datafrom Slider and virtual port

I am trying to read data from virtual port V2 and Display on Serial monitor.

I have used slidebar for v2 if v2 has changed then Serially it should printed .

How can used in loop()

BLYNK_READ(V5) //Blynk app has something on V5
{
sensorData = analogRead(A0); //reading the sensor on A0
Blynk.virtualWrite(V5, sensorData); //sending to Blynk
}

BLYNK_WRITE(V2) {
int counter = param.asInt();
Serial.print(counter);
}

Both These function are not working

Here is my code to read data . I have used DHT11 . i want to set temprature through slider . If slider value chage > setvalue turn on relay else turn off relay/

Serially It wont print any changed values

#define BLYNK_PRINT Serial
#include "DHT.h"
#include "Wire.h"
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include"glob.h"



DHT dht;
SimpleTimer timer;

char auth[] = "xxxxxxxxxxxxxxxxxxxxxxx";            // You should get Auth Token in the Blynk App.
                                           // Go to the Project Settings (nut icon).

char ssid[] = "HOT SPOT";    // Your WiFi credentials.
char pass[] = "Test123";  // Set password to "" for open networks.



void setup() 
{
  // put your setup code here, to run once:
Serial.begin(9600);
 dht.setup(D3);  
 Blynk.begin(auth, ssid, pass);
 timer.setInterval(2000, sendUptime);  
 pinMode(D4,OUTPUT);
  pinMode(D5,OUTPUT);
  pinMode(D6,OUTPUT);

}

void loop() 
{
  // put your main code here, to run repeatedly:
    Blynk.run();
    timer.run();
}


/*
BLYNK_READ(V2)

{
  
  int pinValue = param.asInt();
if(pinValue>=temperature)
{
  digitalWrite(D5,HIGH);
}else
{
  digitalWrite(D5,LOW);
}
  
  
  
}*/

BLYNK_WRITE(V2) {
int counter = param.asInt();
Blynk.virtualWrite(V2, counter);
Serial.print(counter);
}




void sendUptime()
{
  
  delay(dht.getMinimumSamplingPeriod());  /* Delay of amount equal to sampling period */

   humidity = dht.getHumidity(); /* Get humidity value */
   temperature = dht.getTemperature(); /* Get temperature value */
  Serial.println("Humidity and temperature\n\n");
  Serial.print("Current humidity = ");
  Serial.print(humidity);
  Serial.print("%  ");
  Serial.print("temperature = ");
  Serial.print(temperature); 
  Blynk.virtualWrite(V0, temperature);
  Blynk.virtualWrite(V1, humidity);
  
}

What does your Serial Monitor show?

This statement is redundant. Why write the same value that you are reading as input?

Just as @ldb asked, what does your monitor show? That will be the clue to what is happening. Serial.print like what you are using works well and has been so fro quite some time.