Each item in Minecraft has a unique ID assigned to it, known as an item ID, this can be used in commands to spawn the item into the game. The item ID for debug stick in Minecraft is shown below:
The Debug Stick item can be spawned in Minecraft with the below command. Cheats must be enabled before this will work.
This item can be spawned in using its spawn commands that are found on this page. It can be used to edit block states - simply hit a block with it to cycle through blockstates, shifting and hitting a block will cycle through blockstates in reverse order.