Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement debugging utilities #18

Open
JoaaoVerona opened this issue May 17, 2016 · 0 comments
Open

Implement debugging utilities #18

JoaaoVerona opened this issue May 17, 2016 · 0 comments

Comments

@JoaaoVerona
Copy link
Owner

In a more general way, it is necessary to implement debugging utilities, like breakpoints, which could have conditions and/or dynamic injection of code. This will only be possible when #17 is implemented, and #1 is fixed, so that source code can be mapped to the generated compiled structures. Also, when implementing a small IDE in the future, it would be able to manage breakpoints easily.

Definition:

  • In Java:

Component.insertBreakpoint(String condition, String execute)

  • In a script (alternative 1):

breakpoint(string, string)

  • In a script (alternative 2):

breakpoint(any (resultor), string)

  • In a script (alternative 3):

breakpoint(any (resultor), ref (callback))

PS: the definition is subjected to changes.

Example usage:

using dialogs
using std

for i in (0, 255) {
  breakpoint("i == 155", "dialog(\"Hey!\", \"i reached 155.\")")
  # or:
  breakpoint(i == 155, "dialog(\"Hey!\", \"i reached 155.\")")
  # or:
  def breakpointDialog() {
    dialog("Hey!", "i reached 155.")
  }

  breakpoint(i == 155, @breakpointDialog)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant