mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
cdp: dump runtime js only in debug mode
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
const builtin = @import("builtin");
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const cdp = @import("cdp.zig");
|
const cdp = @import("cdp.zig");
|
||||||
|
|
||||||
@@ -37,7 +38,7 @@ pub fn processMessage(cmd: anytype) !void {
|
|||||||
|
|
||||||
fn sendInspector(cmd: anytype, action: anytype) !void {
|
fn sendInspector(cmd: anytype, action: anytype) !void {
|
||||||
// save script in file at debug mode
|
// save script in file at debug mode
|
||||||
if (std.log.defaultLogEnabled(.debug)) {
|
if (builtin.mode == .Debug) {
|
||||||
try logInspector(cmd, action);
|
try logInspector(cmd, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user