# Runtime Debugging with Groovy Console

DevFeed: [Runtime Debugging with Groovy Console](<https://devfeed.tech/articles/runtime-debugging-with-groovy-console-19503.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/runtime-debugging-with-groovy-console/>)

Author: Steve Hannah

Published: 2019-11-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Groovy](<https://devfeed.tech/topics/groovy.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [simulator](<https://devfeed.tech/topics/simulator.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [dialog](<https://devfeed.tech/tags/dialog.md>), [groovy](<https://devfeed.tech/tags/groovy.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [simulator](<https://devfeed.tech/tags/simulator.md>), [tool](<https://devfeed.tech/tags/tool.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

The article introduces a Groovy Console in the Codename One simulator for running code snippets in an app's runtime environment. It demonstrates inspecting the current form, displaying dialogs, and using ComponentSelector to inspect component properties and state.

## Source excerpt

We recently added a new tool to the Codename One simulator that will allow you to run arbitrary code snippets in your app's runtime environment. You can access it from "File" > "Groovy Console", while your app is running in the simulator. This will open the following dialog that will allow you to execute arbitrary Groovy code: As you may suspect, you should use the Groovy programming language in this console. If you're not familiar with Groovy, don't worry. The language is basically just Java with some nice short-cuts. In fact, in many cases, you can probably just write Java code, and it will still work. Personally, I like the way that Groovy lets you refer to object properties via their property name, so you don't need to use the getter or setter methods explicitly. E.g. You can do "form.title", instead of "form.getTitle()", to get the form's title. The former is converted into the latter automatically for you.