Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HaxeDevelop debug does not stop on breakpoint

I am new to HaxeDevelop (but experienced with FlashDevelop) and it has essentially no useful documentation that I can find via a Google search. I am trying to get a simple app up and running with OpenFL and Starling. It had an issue so I tried putting a breakpoint. However, it doesn't stop at the breakpoint. I even put several breakpoints in the main class code and it won't stop. I've even tried making a new project with just a main class and a dummy class and it won't breakpoint on this either. Do I have to tell it to use a special debug process or something? Do I need to install any more software? Should I just use VS Code?

I installed HaxeDevelop and haxe and lime and OpenFL. I made a new OpenFL project and did some simple work in the Main file (make some integer variables, prints some stuff etc.) and littered it with breakpoints. I run it and the output prints (but does not stop at any breakpoints):

Build succeeded
Done(0)
haxelib run lime run "project.xml" neko -debug
Running process: C:\HaxeToolkit\haxe\haxelib.exe run lime run "project.xml" neko -debug
Main.hx:17: Hello World!
Main.hx:21: Did some stuff... Did it stop?
Done(0)

I've tried it using neko, html5, and flash and none of them will stop at the breakpoints.

If anyone knows of a good tutorial for getting Haxe to run in debug mode in HaxeDevelop, FlashDevelop, or VS Code, I would super appreciate it.

like image 703
loganjones16 Avatar asked Apr 08 '19 21:04

loganjones16


People also ask

Why won't the Visual Studio debugger stop on breakpoints?

When you debug ASP.NET applications in Visual Studio .NET, the debugger might not stop on breakpoints. This problem occurs because ASP.NET debugging isn't enabled on the application. To resolve this problem, follow these steps in Visual Studio .NET: Right-click your project from the Solution Explorer, and then click Properties.

Why doesn’t my program stop at breakpoints?

If your program does not stop at breakpoints then follow the below list step by step. Scope: This blog is about the ABAP Development Tools in Eclipse (ADT), not about the SAP GUI Debugger. Nevertheless, many of the following hints are also useful for the SAP GUI Debugger as well. 1) Check whether your breakpoint looks normal like this one .

Why is devtool breakpoint not working?

Also, it's possible that breakpoints are disabled. You can toggle this in the debugger or by pressing Ctrl + F8 Show activity on this post. Here is how I solve it. Because I did add folder to workspace. And then, devTool breakPoint doesn't work. After I remove folder from workspace, breakpoint is ok! Show activity on this post.

How to get xdebugger to break at the beginning of a file?

I could get xdebugger to break at the beginning of the file, but it would skip the rest of my breakpoints. If you are using Netbeans, check that your Project Url ( Project Properties->Run Configuration ) points to the correct location. With the Project URL pointed to the right folder, breakpoints starting working as expected.


1 Answers

HaxeDevelop / FlashDevelop only support breakpoint debugging on the Flash target. It can be a bit tricky to set up since it requires a 32 bit Java to be in your PATH (this limitation does not exist with Flash debugging in VSCode). You also need to make sure that a Flash Debug Player is associated with .swf files. You can find more details here and here.


VSCode on the other hand supports debugging a much wider range of targets:

  • JavaScript
  • HashLink
  • HXCPP
  • Eval (macros)
  • Flash

There is no debugging support for the Neko target in any IDE.

If you are using OpenFL, you should install the Lime extension, which handles all the configuration of the individual debug adapters for you (note: this requires Lime 7.3.0 or newer). In a fresh project, simply "Start Debugging" and select "Lime" from the dropdown:

This creates a Lime launch configuration in .vscode/launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Lime",
            "type": "lime",
            "request": "launch"
        }
    ]
}

Debugging should now work out of the box with the currently selected target (just make sure you have the "Debug" configuration of the target selected). You can click the status bar indicator to switch between configurations:

If you're missing a debug extension, the Lime extension should open a popup that offers to install it.

like image 58
Gama11 Avatar answered Sep 27 '22 20:09

Gama11