Challenge Solver: Debugging Tips

We provide several ways to help you write the best code you can.

Code Errors

Most compilation & runtime errors should show up automatically in the results pane.

Write your own test cases!

The Sample Tests editor is available for you to write your own test cases. These are your own cases, and usually you'll be provided with a few basic examples. Whatever changes you make to this code will be provided to the reviewer, so you can use this as an extra way to stand out, showing your ability to write quality, testable code.

You should modify the code in that view to adjust or add more test cases for debugging your code as you work. Think about additional common and edge cases you might want to add.

STDOUT / Console Output

While Qualified doesn't support interactive debugging, you can write to stdout (sometimes called "system out" or "console") in any language for outputting debugging information. When you run your code, this will show alongside the test output.

Note that output is collapsed by default for passing tests.

Examples:

  • C

    #include <stdio.h>
    printf("debug message\n");
  • Clojure

    (print "debug message")
  • C++

    #include <iostream>
    std::cout << "debug message\n";
  • C#

    System.Console.WriteLine("debug message");
  • Dart

    print("debug message");
  • Elixir

    IO.puts("debug message")
  • Erlang

    io:fwrite("debug message\n"),
  • F#

    printf("debug message")
  • Go

    import "fmt"
    fmt.Println("debug message")
  • Groovy

    print("debug message")
  • Java

    System.out.println("debug message");
  • JavaScript / TypeScript / CoffeeScript

    console.log("debug message");
  • Kotlin

    println("debug message")
  • Lua

    print("debug message")
  • Objective C

    NSLog(@"debug message");
  • OCaml

    print_endline "debug message";
  • PHP

    echo "debug message\n";
  • Python

    print("debug message")
  • R

    print("debug message")
  • Ruby

    p "debug message"
  • Rust

    println!("debug message");
  • Scala

    print("debug message")
  • Shell

    echo "debug message"
  • SQL

    SELECT 'debug message'
  • Swift

    print("debug message")