Skip to content

cppia: locals and continuing break with hxcpp master; breakpoints stay unverified #4

Open

Description

@Jarrio

With vshaxe#48 merged (5660aa5) and the file mapping fix (14a4e50), a debug cppia host stops at breakpoints in a script it loads. How well that works depends on the runtime:

  • libhxcpp main (2573b94) with Haxe 4.3.7: breakpoints, stepping, locals and the console work.
  • hxcpp master (504403d) with the Haxe 5 preview: a breakpoint stops at the right line with the right stack, but locals read as 0 (a=0 b=0 instead of 2 and 3), and after continuing the host exits with code 1 and prints nothing more.
  • hxcpp 4.3.2, or git hxcpp with Haxe 4: there's no script-loaded callback (__hxcpp_dbg_setOnScriptLoadedFunction exists only at HXCPP_API_LEVEL 500 or above), so breakpoints set before the script loads never take effect.

Also:

  • A breakpoint on return a + b; in a script stops twice per call.
  • The server can't tell the debugger when a waiting breakpoint takes effect, so the editor keeps showing it as unverified. A notification from the server when onScriptLoaded sets breakpoints would fix that.

Setup used: the host is cpp.cppia.Host.runFile(Sys.args()[0]), built with -D scriptable --cpp host -debug -cp <hxcpp-debug-server> --macro hxcpp.debug.jsonrpc.Macro.injectServer(). The script is built with --cppia script.cppia -debug.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions