We will explain in the following order:

  1. Quick tour: debugging interface

  2. How to debug: logging out to the console

  3. How to debug: executing your code with specific input

  4. How to debug: frontend challenges

  5. How to debug: using 3rd party libraries

1. Quick tour: debugging interface

Run Test - click this button to run the challenge’s default unit tests.

Note ☝️
Useful for checking your score!

Run - click this button to execute your source code.

Note ☝️
Useful for debugging!

Console - check this tab to see the results from debugging or running tests.

Test Results - check this tab to see the summary of your unit test results.

Note ☝️
Each row is a link. Click on it to jump to the result details.

2. How to debug: logging out to the console

If you want to log out something to the console, using the Run button is efficient.

For example, if you want to log out something from the main function below, you can write a  code like this inside (This example is using JavaScript) ...

and if you click Run...

...you can see the message on the Console you logged out from the main function 🎉

Note ☝️
The tests may not run correctly once you add this code. Please delete or comment out the code whenever you want to run tests.

3. How to debug: executing your code with specific input

If you would like to check the result of executing your code with specific input, using the debug feature if efficient.
Here we will explain the 2 ways to do so:

  1. Execute the code using predefined input

  2. Execute the code using customized input

1. Execute the code using the predefined input

To use the debug feature, click the cogwheel icon button.

Click the pull down menu.

Select the predefined input you would like to run.

You can see what the predefined input is from this text area.

Click "Execute".

You can see the debug results on the Console tab 🎉

2. Execute the code using customized input

Click the cogwheel icon button.

Click the text box area.

Edit the input however you would like.

Note ☝️
If it is an SQL challenge, you can input queries here instead.
Read:
How to debug an SQL Challenge for more details.

Click "Execute".

You can see the debug results on your console 🎉

4. How to debug: frontend challenges

For frontend challenges, read: How to debug on a frontend development challenge for more details.

5. How to debug: using 3rd party libraries

If you would like to debug using 3rd party libraries, read: How to install libraries on a development/algorithm style challenge for more details.

That's it! Good luck :)


回答が見つかりましたか?