diff --git a/pmbus.cpp b/pmbus.cpp
index bd9e697..b525bd9 100644
--- a/pmbus.cpp
+++ b/pmbus.cpp
@@ -48,6 +48,24 @@
     return name;
 }
 
+fs::path PMBus::getPath(Type type)
+{
+    switch (type)
+    {
+        default:
+            /* fall through */
+        case Type::Base:
+            return basePath;
+            break;
+        case Type::Hwmon:
+            return basePath / "hwmon" / hwmonDir;
+            break;
+        case Type::Debug:
+            return debugPath / hwmonDir;
+            break;
+    }
+}
+
 bool PMBus::readBitInPage(const std::string& name,
                           size_t page,
                           Type type)
@@ -60,12 +78,7 @@
 {
     unsigned long int value = 0;
     std::ifstream file;
-    fs::path path{basePath};
-
-    if (type == Type::Hwmon)
-    {
-        path /= hwmonRelPath;
-    }
+    fs::path path = getPath(type);
 
     path /= name;
 
@@ -113,12 +126,7 @@
 void PMBus::write(const std::string& name, int value, Type type)
 {
     std::ofstream file;
-    fs::path path{basePath};
-
-    if (type == Type::Hwmon)
-    {
-        path /= hwmonRelPath;
-    }
+    fs::path path = getPath(type);
 
     path /= name;
 
@@ -146,7 +154,7 @@
     }
 }
 
-void PMBus::findHwmonRelativePath()
+void PMBus::findHwmonDir()
 {
     fs::path path{basePath};
     path /= "hwmon";
@@ -158,15 +166,14 @@
             std::string::npos) &&
             (fs::is_directory(f.path())))
         {
-            hwmonRelPath = "hwmon";
-            hwmonRelPath /= f.path().filename();
+            hwmonDir = f.path().filename();
             break;
         }
     }
 
     //Don't really want to crash here, just log it
     //and let accesses fail later
-    if (hwmonRelPath.empty())
+    if (hwmonDir.empty())
     {
         log<level::ERR>("Unable to find hwmon directory "
                         "in device base path",
diff --git a/pmbus.hpp b/pmbus.hpp
index d384279..4946829 100644
--- a/pmbus.hpp
+++ b/pmbus.hpp
@@ -9,14 +9,18 @@
 namespace pmbus
 {
 
+namespace fs = std::experimental::filesystem;
+
 /**
  * If the access should be done in the base
- * device directory or the hwmon directory.
+ * device directory, the hwmon directory, or
+ * the debug director.
  */
 enum class Type
 {
     Base,
-    Hwmon
+    Hwmon,
+    Debug
 };
 
 /**
@@ -48,7 +52,7 @@
         PMBus(const std::string& path) :
             basePath(path)
         {
-            findHwmonRelativePath();
+            findHwmonDir();
         }
 
         /**
@@ -57,7 +61,7 @@
          *
          * @param[in] name - path concatenated to
          *                   basePath to read
-         * @param[in] type - either Base or Hwmon
+         * @param[in] type - one of Base, Hwmon, or Debug
          *
          * @return bool - false if result was 0, else true
          */
@@ -71,7 +75,7 @@
          * @param[in] name - path concatenated to
          *                   basePath to read
          * @param[in] page - page number
-         * @param[in] type - either Base or Hwmon
+         * @param[in] type - one of Base, Hwmon, or Debug
          *
          * @return bool - false if result was 0, else true
          */
@@ -86,7 +90,7 @@
          * @param[in] name - path concatenated to
          *                   basePath to write
          * @param[in] value - the value to write
-         * @param[in] type - either Base or Hwmon
+         * @param[in] type - one of Base, Hwmon, or Debug
          */
         void write(const std::string& name, int value, Type type);
 
@@ -118,19 +122,33 @@
          * Finds the path relative to basePath to the hwmon directory
          * for the device and stores it in hwmonRelPath.
          */
-         void findHwmonRelativePath();
+         void findHwmonDir();
+
+        /**
+         * Returns the path to use for the passed in type.
+         *
+         * @param[in] type - one of Base, Hwmon, or Debug
+         *
+         * @return fs::path - the full path to Base, Hwmon, or Debug path
+         */
+         fs::path getPath(Type type);
 
     private:
 
         /**
          * The sysfs device path
          */
-        std::experimental::filesystem::path basePath;
+        fs::path basePath;
 
         /**
-         * The relative (to basePath) path to the hwmon directory
+         * The directory name under the basePath hwmon directory
          */
-        std::experimental::filesystem::path hwmonRelPath;
+        fs::path hwmonDir;
+
+        /**
+         * The pmbus debug path with status files
+         */
+        const fs::path debugPath = "/sys/kernel/debug/pmbus/";
 
 };
 
