How do I enter cheats using the Javascript / Developer console?

Solution 1:

First, open up the Javascript / Developer console of your browser:

Chrome:

  1. Press either CTRL + SHIFT + J to open the "Console" tab of the Developer Tools.

Alternative method:

  1. Press either CTRL + SHIFT + I or F12 to open the Developer Tools.

  2. Press ESC (or click on "Show console" in the bottom right corner) to slide the console up.

Note: In Chrome's dev tools, there is a "Console" tab. However, a smaller "slide-up" console can be opened while any of the other tabs is active.


Safari:

  1. Press CTRL + ALT + I to open the Web Inspector.

  2. See Chrome's step 2. (Chrome and Safari have pretty much identical dev tools.)

Note: Step 1 only works if the "Show Develop menu in menu bar" check box in the Advanced tab of the Preferences menu is checked!


Internet Explorer 9:

  1. Press F12 to open the developer tools. 2. Click the "Console" tab.

Firefox:

  1. Press CTRL + SHIFT + K to open the Web console.

or, if Firebug is installed (recommended):
1. Press F12 to open Firebug. 2. Click on the "Console" tab.


Opera:

  1. Press CTRL + SHIFT + I to open Dragonfly. 2. Click on the "Console" tab.

Then, type or paste the cheat code you want to enter. e.g. Enter candies.setNbrOwned(x), where x is the amount of candies you want. This will set the amount of candies you have (note that your candy per second rate will stay as it were before). Be careful not to eat too much candy as you might have issues solving a particular part of the game.

Questions related to Candy box! cheats:

  • How can I increase the number of potions?
  • How do I lower my hitpoints?
  • How do I change the candy per second rate in the JavaScript console?

More cheats at the "Cheats" article of the Candy Box Wiki


Javascript / Developer console opening instructions from: Webmasters Stack Exchange post, "How to open the JavaScript console in different browsers?"

Solution 2:

To enter cheat codes in Candy-Box simply do the following:

  1. Go to the javascript console of any browser
  2. Enter commands like:

    • candies.setnbrOwned = <Amt of candies>

    • candies.setcandiesPerSecond = <Amt of candies>