diff --git a/automotive/vehicle/aidl/impl/current/utils/common/include/VehicleUtils.h b/automotive/vehicle/aidl/impl/current/utils/common/include/VehicleUtils.h
index 90a7c46..5b19100 100644
--- a/automotive/vehicle/aidl/impl/current/utils/common/include/VehicleUtils.h
+++ b/automotive/vehicle/aidl/impl/current/utils/common/include/VehicleUtils.h
@@ -310,6 +310,12 @@
     return toScopedAStatus(result, getErrorCode(result), additionalErrorMsg);
 }
 
+// This is for debug purpose only.
+inline std::string propIdToString(int32_t propId) {
+    return toString(
+            static_cast<aidl::android::hardware::automotive::vehicle::VehicleProperty>(propId));
+}
+
 struct PropIdAreaId {
     int32_t propId;
     int32_t areaId;
@@ -317,6 +323,11 @@
     inline bool operator==(const PropIdAreaId& other) const {
         return areaId == other.areaId && propId == other.propId;
     }
+
+    // This is for debug purpose only.
+    inline std::string toString() const {
+        return fmt::format("{{propId: {}, areaId: {}}}", propIdToString(propId), areaId);
+    }
 };
 
 struct PropIdAreaIdHash {
@@ -329,12 +340,6 @@
 };
 
 // This is for debug purpose only.
-inline std::string propIdToString(int32_t propId) {
-    return toString(
-            static_cast<aidl::android::hardware::automotive::vehicle::VehicleProperty>(propId));
-}
-
-// This is for debug purpose only.
 android::base::Result<int32_t> stringToPropId(const std::string& propName);
 
 // This is for debug purpose only. Converts an area's name to its enum definition.
@@ -362,4 +367,21 @@
 }  // namespace hardware
 }  // namespace android
 
+// Formatter must not be defined inside our namespace.
+template <>
+struct fmt::formatter<android::hardware::automotive::vehicle::PropIdAreaId> {
+    template <typename ParseContext>
+    constexpr auto parse(ParseContext& ctx) {
+        return ctx.begin();
+    }
+
+    template <typename FormatContext>
+    auto format(const android::hardware::automotive::vehicle::PropIdAreaId& p,
+                FormatContext& ctx) const {
+        return fmt::format_to(ctx.out(), "{{propId: {}, areaId: {}}}",
+                              android::hardware::automotive::vehicle::propIdToString(p.propId),
+                              p.areaId);
+    }
+};
+
 #endif  // android_hardware_automotive_vehicle_aidl_impl_utils_common_include_VehicleUtils_H_
diff --git a/automotive/vehicle/aidl/impl/current/utils/common/test/VehicleUtilsTest.cpp b/automotive/vehicle/aidl/impl/current/utils/common/test/VehicleUtilsTest.cpp
index 1048877..8278376 100644
--- a/automotive/vehicle/aidl/impl/current/utils/common/test/VehicleUtilsTest.cpp
+++ b/automotive/vehicle/aidl/impl/current/utils/common/test/VehicleUtilsTest.cpp
@@ -787,6 +787,29 @@
     ASSERT_FALSE(result.ok());
 }
 
+TEST(VehicleUtilsTest, testPropIdAreaIdToString) {
+    PropIdAreaId propIdAreaId = {
+            .propId = toInt(VehicleProperty::PERF_VEHICLE_SPEED),
+            .areaId = 0,
+    };
+
+    ASSERT_EQ(propIdAreaId.toString(), "{propId: PERF_VEHICLE_SPEED, areaId: 0}");
+}
+
+TEST(VehicleUtilsTest, testPropIdAreaIdFormatter) {
+    PropIdAreaId propIdAreaId1 = {
+            .propId = toInt(VehicleProperty::PERF_VEHICLE_SPEED),
+            .areaId = 0,
+    };
+    PropIdAreaId propIdAreaId2 = {
+            .propId = toInt(VehicleProperty::HVAC_FAN_SPEED),
+            .areaId = 1,
+    };
+
+    ASSERT_EQ(fmt::format("{}", std::vector<PropIdAreaId>{propIdAreaId1, propIdAreaId2}),
+              "[{propId: PERF_VEHICLE_SPEED, areaId: 0}, {propId: HVAC_FAN_SPEED, areaId: 1}]");
+}
+
 class InvalidPropValueTest : public testing::TestWithParam<InvalidPropValueTestCase> {};
 
 INSTANTIATE_TEST_SUITE_P(InvalidPropValueTests, InvalidPropValueTest,
