How to enter cheats using the Javascript / Developer console

candy-boxcheats

I _really_ love candies. I also would like to be able to afford everything in the game and eat as much candies as possible to increase my hitpoints/health.

I've heard that I can enter various cheats in this game using the Javascript / Developer console. How do I do this?


Related: Will using Javascript sorcery have a negative effect on the game?

Best Answer

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:

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?"