Skip to content

Visual Studio Code Debugger for Haxe/Flash applications

License

Notifications You must be signed in to change notification settings

vshaxe/flash-debugger

Repository files navigation

Flash Debugger

CI Version Installs

This is an extension for debugging Haxe applications on the Flash target via FDB. It is best used with the vshaxe extension.

Example

Usage

There's three prerequisites:

  1. Download the "Flash Player projector content debugger" from here and associate it with .swf files.

    On Linux, make sure the player's executable is accessible globally (for example, in the /usr/bin/ directory or in the PATH) and its name is no other than flashplayer (you could rename the original file or make a symlink to it).

  2. Make sure JAVA_HOME is defined or you have java in your PATH (to run fdb.jar). Please refer to these links for instructions:

  3. Compile the .swf file you want to debug with the -D fdb define.

After this, you need a launch configuration. The launch.json should look something like this:

{ 
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Flash",
            "type": "fdb",
            "request": "launch",
            "program": "${workspaceFolder}/bin/application.swf"
        }
    ]
}

Replace /bin/application.swf with the path to your swf file.

You can also generate a config via Add Configuration... -> Haxe (Flash):

Add Configuration

Installing from source

  1. Navigate to the extensions folder (C:\Users\<username>\.vscode\extensions on Windows, ~/.vscode/extensions otherwise)
  2. Clone this repo: git clone https://github.com/vshaxe/flash-debugger
  3. Change current directory to the cloned one: cd flash-debugger.
  4. Install dependencies: npm install
  5. Do npx haxe build.hxml