If you start with a new panel you can open the Lua editor (menu: Panel>Lua Editor). There you can add a new method and add your “test” code. In your code you can use the console to output data etc. to the console window e.g
This code sends the text “Weird char:” plus the value (in this case) of the variable ‘midiParam’ to the console window.
This is a way to check your code. I think you cannot use the console window as input for Lua code, at least I never used it that way. To find about the way you can use Lua with a panel you should download a few panels with Lua code. This is the download link: http://ctrlr.org/panels/ (This link used to be present on the forum site (under downloads), but has recently disappeared for unknown reasons.)