Coder Social home page Coder Social logo

flash-debugger's Introduction

Haxe Support for Visual Studio Code

This is an extension for Visual Studio Code that adds support for the Haxe language, leveraging the Haxe Language Server. It works best with the latest Haxe 4 release, but supports any Haxe version starting from 3.4.0.

demo

Some framework-specific extensions exist to extend the functionality further:

Features

This is just a brief overview of the supported features. For more details, check out our extensive documentation.

Building

For instructions on building/installing from source, please see the dedicated wiki page.

flash-debugger's People

Contributors

diegosolo avatar gama11 avatar ibilon avatar matulkum avatar nulld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flash-debugger's Issues

No globals available in debugger

There are no globals available when you break in the debugger. For example, the static variable FlxG.width has no value and is not visible in the globals list.

$1000 bounty for integrated/testing/actually-works C++ debugging

"Support for the C++ target via hxcpp-debugger is planned."

I'm willing to put my money where my mouth is. I'm happy to put $1,000.00 USD towards the completion of this feature, payable by Level Up Labs, LLC. If multiple people wind up collaborating on it, I'm happy to split the bounty among the contributors.

This would be well worth the investment as the lack of well supported, IDE-integrated C++ debugging is the no. 1 drag on my daily productivity and also one of the major features holding back wider haxe adoption by newcomers.

Mistakens for other class of the same name in another package

  1. Create a class named System in a OpenFL/HaxeFlixel project
  2. Write some code which uses System in another class (maybe Main)
  3. Set a breakpoint there (Main in this case)
  4. Start debugging
  5. Find that the debugger steps in lime.system.System instead although the line number is relevant to our System

OSX Compatibility

The usage instructions seem to only cover Windows or Linux installations. I tried to follow the Linux instructions as best i could but result with this error.

Error: Command failed: "/Users/abbi/projects/scopa/bin/flash/bin/scopa.swf"
/bin/sh: /Users/abbi/projects/scopa/bin/flash/bin/scopa.swf: Permission denied

Trying all kinds of things like modifying permissions has not helped. the java command is in my path. .swf files are associated with the player, but flashplayer is not globally accessible due to OSX constraints.

Is OSX the issue here?

Spaces in 'program' not properly escaped

If there are spaces in your path to the .swf that you are launching, the debugger will just open a command prompt.

Issue is present on Windows, have not tested other operating systems.

Workaround: Do not use a path with spaces in it.

Setting Java Path

From this line in the Readme: Additionally, java needs to be in your PATH (to run fdb.jar)., it sounds like java's path may be hardcoded? Is there a way to configure the java path, to something like JAVA_HOME?

Can't launch/connect with Flash Player in Ubuntu

Hi, I'm trying to properly install the flash debugger in Xubuntu 16.04 with no luck. I wonder if it's just me doing things the wrong way, but there's just too little information around about this specific subject. This is what I've done so far:

  • Install Haxe 3.4
    sudo add-apt-repository ppa:haxe/releases -y
    sudo apt-get update
    sudo apt-get install haxe -y
    mkdir ~/.haxelib-repository && haxelib setup ~/.haxelib-repository

  • Install Java JDK
    sudo apt-get install default-jdk
    (path: /usr/lib/jvm/default-java/)

  • Set JAVA_HOME enviroment variable
    Open /etc/environment
    Add the line: JAVA_HOME="/usr/lib/jvm/default-java/"
    Reload variables: ource /etc/environment
    Check: echo $JAVA_HOME

  • Install flixel
    haxelib install flixel
    haxelib install flixel-tools
    haxelib run lime setup
    lime setup android

  • Install g++
    sudo apt-get install g++

  • Install Flash Player Debugger
    Download https://fpdownload.macromedia.com/pub/flashplayer/updaters/25/flash_player_sa_linux_debug.x86_64.tar.gz
    Decompress and copy flashplayerdebugger to /usr/bin
    Add an item to the system menu
    Associate swf files

  • Download and install Visual Studio from https://code.visualstudio.com/Download

  • Install Haxe Extension Pack (vshaxe) from the package manager

  • Configure Visual Studio (http://haxeflixel.com/documentation/visual-studio-code/)
    navigate to File -> Preferences -> Keyboard Shortcuts and change keybindings.json on the right with the following:
    // Place your key bindings in this file to overwrite the defaults
    [
    { "key": "ctrl+b", "command": "workbench.action.tasks.runTask" }
    ]

After doing this, I can open any swf file by double clicking it. Yet, when I run "flash build + launch" from Visual Studio the compilation runs but then nothing happens; it just stays waiting. I tried opening the movie with a double click while the debugger is waiting with no success (the window opens but the debugger keeps waiting). I'd appreciate some help.

Thanks!

Dev branch fdb regression

On the master branch, switching between call stack entries works fine:

On the devel branch, doing so causes a crash:

This repo (or probably any fdb debugging session) can be used to reproduce the issue. @nulld Any ideas?

AIR application debug

Is there any way to debug a Haxe/AIR application ? would be a nice to be able to specify a AIR .app XML file instead of the SWF to launch with AIR.

Breakpoints Not Working

Hi,

I'm new to Haxe and using it with VS Code so excuse me if I'm doing something stupid but I'm unable to get breakpoints to work with the Haxe Debug extension.

OSX 10.12.4
VS Code 1.11.2
Haxe Debug Extension 1.1.1
Flash Player Debugger 25.0.0.127
JDK 8u121

I'm getting the following output when setting a breakpoint (by using "receiveAdapterOutput": true in my tasks.json) :-

DebugAdapter: {"command":"setBreakpoints","arguments":{"source":{"path":"/Users/peter/Desktop/FlixelApp/source/PlayState.hx"},"lines":[14],"breakpoints":[{"line":14}],"sourceModified":false},"type":"request","seq":34}
DebugAdapter: sendResponse: {
seq : 0,
type : response,
request_seq : 34,
command : setBreakpoints,
success : false,
message : TypeError: Cannot read property 'split' of undefined
at Function.StringTools.replace (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:155:10)
at Object.getKey (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:1847:25)
at Object.execute (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:1733:22)
at DebugSession.setBreakPointsRequest (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:305:11)
at DebugSession.dispatchRequest (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/node_modules/vscode-debugadapter/lib/debugSession.js:312:22)
at DebugSession.dispatchRequest (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:262:50)
at DebugSession.ProtocolServer._handleData (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/node_modules/vscode-debugadapter/lib/protocol.js:78:38)
at Socket. (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/node_modules/vscode-debugadapter/lib/protocol.js:23:60)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7),
body : {
error : {
id : 1104,
format : {_stack},
variables : {
_exception : Cannot read property 'split' of undefined,
_stack : TypeError: Cannot read property 'split' of undefined
at Function.StringTools.replace (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:155:10)
at Object.getKey (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:1847:25)
at Object.execute (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:1733:22)
at DebugSession.setBreakPointsRequest (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:305:11)
at DebugSession.dispatchRequest (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/node_modules/vscode-debugadapter/lib/debugSession.js:312:22)
at DebugSession.dispatchRequest (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/bin/fdb_adapter.js:262:50)
at DebugSession.ProtocolServer._handleData (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/node_modules/vscode-debugadapter/lib/protocol.js:78:38)
at Socket. (/Users/peter/.vscode/extensions/vshaxe.haxe-debug-1.1.1/node_modules/vscode-debugadapter/lib/protocol.js:23:60)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
},
sendTelemetry : true
}
}
}

Am I doing something wrong or is this a bug? Let me know if you need any more info.

The debugger does not automatically connect to the player.

I did everything according to the instructions and now, when I start debugging, my swf file is executed, but the debugger continues to wait until I click the "Debugger" option in the player context menu.
Win 10
VS Code 1.33.1
Haxe 4.0.0-rc.2
vshaxe 2.9.2
flash-debugger 1.2.2

Flash debugger doesn't stop well

Testing with heaps/samples/base2D:

Scenario 1:

  • flash debugger successfully launchs with F5
  • closing the window doesn't stop debugging

Scenario 2:

  • flash debugger successfully launchs with F5
  • Shift-F5 does not close the flash player
  • closing the window manually
  • F5 no longer works, requires restarting VSCode

Support variable setting

Should be fairly straightforward, at least for the hxcpp-debugger. All it needs is a set var = value or even set obj.field = value command.

debug hover doesn't work on (get, set) properties

testClass.x could not be evaluated

263c8559

package;

import flash.display.Sprite;

class Main extends Sprite
{
    public function new() 
    {
        super();
        
        var testClass: TestClass = new TestClass();
        testClass.x = 20;

        trace(testClass.x);
    }
}
package;

class TestClass
{
    private var _x: Int = 0;

    public var x(get, set):Int;

    public function new()
    {

    }

    private function get_x() {
        return this._x;
    }

    private function set_x(value) {
        return this._x = value;
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.