1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-11-09 13:10:24 +01:00

Begin work on Xdebug mode switcher (#168)

This commit is contained in:
2022-05-01 22:07:18 +02:00
parent af8807f799
commit ef9e0fd916
5 changed files with 79 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
//
// Xdebug.swift
// PHP Monitor
//
// Created by Nico Verbruggen on 01/05/2022.
// Copyright © 2022 Nico Verbruggen. All rights reserved.
//
import Foundation
class Xdebug {
public static var enabled: Bool {
return !self.mode.isEmpty
}
public static var mode: String {
return Command.execute(path: Paths.php, arguments: ["-r", "echo ini_get('xdebug.mode');"])
}
public static var modes: [String] {
return [
"off",
"develop",
"coverage",
"debug",
"gcstats",
"profile",
"trace",
]
}
}