Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsakenHarmony committed Jun 7, 2023
1 parent 516a886 commit e637d54
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/turbopack-node/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ use std::env;

const DEBUG_JS_VAR: &str = "TURBOPACK_DEBUG_JS";

/// Checks if the operation passed is included in the `TURBOPACK_DEBUG_JS` env
/// var to enable node.js debugging at runtime.
///
/// This is preferable to manually passing a boolean because recompiling won't
/// be necessary.
pub fn should_debug(operation: &str) -> bool {
let Ok(val) = env::var(DEBUG_JS_VAR) else {
return false;
Expand Down

0 comments on commit e637d54

Please sign in to comment.