keecode logokeecode
12

Invalid Debug Argument

Invalid debug argument

Node.js

Exit Code Information

Exit Code

12

Name

Invalid Debug Argument

Category

Node.js

Usage Context

Invalid debugger port specified

Common Usage

Bash Script

#!/bin/bash

if [ condition ]; then
  echo "Invalid Debug Argument"
  exit 12
fi

Check Exit Code

./script.sh
echo $?  # Prints the exit code

# Check if exit code matches
if [ $? -eq 12 ]; then
  echo "Invalid Debug Argument"
fi

Node.js/JavaScript

// Exit with code 12
process.exit(12);

// Or throw error that results in exit code
if (error) {
  console.error('Invalid Debug Argument');
  process.exit(12);
}

Python

import sys

# Exit with code 12
if error:
    print("Invalid Debug Argument")
    sys.exit(12)