Giter Site home page Giter Site logo

Comments (8)

Gama11 avatar Gama11 commented on September 23, 2024

It sounds like you're just running the lime test task with the hxcpp-debug-server library, without actually starting the debugger? You need to do that via the debug menu, not via tasks:

As such, it usually makes more sense to use the lime build task here, which doesn't (unnecessarily) run the game.

from hxcpp-debugger.

neillrobson avatar neillrobson commented on September 23, 2024

Ah, you are correct that in my report I was not actually starting the debugger. At first I was going to shame myself for the oversight, but...

...even though no errors are reported anymore:

C:/Users/[ME]/.vscode-insiders/extensions/hxcpp-debugger/hxcpp-debug-server/./hxcpp/debug/jsonrpc/Server.hx:64: Debug Server Started:
Debug server connected!
C:/Users/[ME]/.vscode-insiders/extensions/hxcpp-debugger/hxcpp-debug-server/./hxcpp/debug/jsonrpc/Server.hx:419: Connected to vsc debugger server at 127.0.0.1:6972

...still, no breakpoints seem to be caught. Here is a screenshot of the unmodified Flixel template, with the breakpoint set at the first line of the Main constructor:

capture

The empty game still loads just fine, and the default game cursor moves around in the resulting window. But the game never pauses.

I also attempted to add the breakpoints, rebuild the project, then run the debugger (thinking that perhaps the breakpoints were compiled into the program), but the behavior was not modified.

Thank you for the rapid response to this issue! Again, if there is any better location to continue this conversation, let me know.

from hxcpp-debugger.

nulld avatar nulld commented on September 23, 2024

Do you compile with '-debug' flag? And what happens if you hit pause button?

from hxcpp-debugger.

neillrobson avatar neillrobson commented on September 23, 2024

The default build task displays as lime test windows -debug --connect 6000.

When I hit the pause button, the application does pause in NativeApplication::handleApplicationEvent(), which seems to be an arbitrary location in the game loop.

I've made a screencast of what takes place and uploaded it here:

https://www.dropbox.com/s/w1dp5r550p8usiu/2018-08-25%2011-20-33.flv?dl=0

Let me know if there is anything else I can do to help!

from hxcpp-debugger.

nulld avatar nulld commented on September 23, 2024

Sorry, can't reproduce it. Everything works as expected.
Can you share your project.xml and .vscode\tasks.json .vscode\launch.json, please.
And tell me what versions of haxe, hxcpp, openfl, lime do you use exactly.

image

from hxcpp-debugger.

neillrobson avatar neillrobson commented on September 23, 2024

project.xml:

<?xml version="1.0" encoding="utf-8"?>
<project>
	<!-- _________________________ Application Settings _________________________ -->

	<app title="Picasso2" file="Picasso2" main="Main" version="0.0.1" company="HaxeFlixel" />

	<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
		or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"-->
	<app preloader="flixel.system.FlxPreloader" />

	<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2-->
	<set name="SWF_VERSION" value="11.8" />

	<!-- ____________________________ Window Settings ___________________________ -->

	<!--These window settings apply to all targets-->
	<window width="640" height="480" fps="60" background="#000000" hardware="true" vsync="false" />

	<!--HTML5-specific-->
	<window if="html5" resizable="false" />

	<!--Desktop-specific-->
	<window if="desktop" orientation="landscape" fullscreen="false" resizable="true" />

	<!--Mobile-specific-->
	<window if="mobile" orientation="landscape" fullscreen="true" width="0" height="0" />

	<!-- _____________________________ Path Settings ____________________________ -->

	<set name="BUILD_DIR" value="export" />
	<classpath name="source" />
	<assets path="assets" />

	<!-- _______________________________ Libraries ______________________________ -->

	<haxelib name="flixel" />
	<haxelib name="hxcpp-debug-server" />

	<!--In case you want to use the addons package-->
	<!--<haxelib name="flixel-addons" />-->

	<!--In case you want to use the ui package-->
	<!--<haxelib name="flixel-ui" />-->

	<!--In case you want to use nape with flixel-->
	<!--<haxelib name="nape" />-->

	<!-- ______________________________ Haxedefines _____________________________ -->

	<!--Enable the Flixel core recording system-->
	<!--<haxedef name="FLX_RECORD" />-->

	<!--Disable the right and middle mouse buttons-->
	<!--<haxedef name="FLX_NO_MOUSE_ADVANCED" />-->

	<!--Disable the native cursor API on Flash-->
	<!--<haxedef name="FLX_NO_NATIVE_CURSOR" />-->

	<!--Optimise inputs, be careful you will get null errors if you don't use conditionals in your game-->
	<haxedef name="FLX_NO_MOUSE" if="mobile" />
	<haxedef name="FLX_NO_KEYBOARD" if="mobile" />
	<haxedef name="FLX_NO_TOUCH" if="desktop" />
	<!--<haxedef name="FLX_NO_GAMEPAD" />-->

	<!--Disable the Flixel core sound tray-->
	<!--<haxedef name="FLX_NO_SOUND_TRAY" />-->

	<!--Disable the Flixel sound management code-->
	<!--<haxedef name="FLX_NO_SOUND_SYSTEM" />-->

	<!--Disable the Flixel core focus lost screen-->
	<!--<haxedef name="FLX_NO_FOCUS_LOST_SCREEN" />-->

	<!--Disable the Flixel core debugger. Automatically gets set whenever you compile in release mode!-->
	<haxedef name="FLX_NO_DEBUG" unless="debug" />

	<!--Enable this for Nape release builds for a serious peformance improvement-->
	<haxedef name="NAPE_RELEASE_BUILD" unless="debug" />

	<!-- _________________________________ Custom _______________________________ -->

	<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
</project>

tasks.json:

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "lime",
			"command": "test",
			"group": {
				"kind": "build",
				"isDefault": true
			}
		},
		{
			"label": "debug: flash",
			"command": "haxelib",
			"args": ["run", "lime", "build", "flash", "-debug", "-Dfdb"],
			"problemMatcher": ["$haxe-absolute", "$haxe", "$haxe-error", "$haxe-trace"]
		}
	]
}

launch.json:

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Flash",
			"type": "fdb",
			"request": "launch",
			"program": "${workspaceRoot}/export/flash/bin/Picasso2.swf",
			"preLaunchTask": "debug: flash"
		},
		{
			"name": "HTML5",
			"type": "chrome",
			"request": "launch",
			"url": "http://127.0.0.1:3000",
			"sourceMaps": true,
			"webRoot": "${workspaceFolder}"
		},
		{
			"name": "Windows",
			"type": "hxcpp",
			"request": "launch",
			"program": "${workspaceRoot}/export/windows/bin/Picasso2.exe"
		},
		{
			"name": "Linux",
			"type": "hxcpp",
			"request": "launch",
			"program": "${workspaceRoot}/export/linux64/bin/Picasso2"
		},
		{
			"name": "Mac",
			"type": "hxcpp",
			"request": "launch",
			"program": "${workspaceRoot}/export/mac64/bin/Picasso2.app/Contents/MacOS/Picasso2"
		}
	]
}

Versions:

  • haxe: 4.0.0-preview.4+1e3e5e016
  • lime: 7.0.0
  • openfl: 8.4.1
  • hxcpp: 4.0.4

Also, later today I can try a few different versions of Visual Studio Code and plugins, since perhaps the editor itself could be causing an issue.

from hxcpp-debugger.

nulld avatar nulld commented on September 23, 2024

Everything works in your environment too for me. Can you send zip with your minimal (not working) example with executable file to nulldivide at gmail com, plz? Will try to figure out what is going wrong.

from hxcpp-debugger.

neillrobson avatar neillrobson commented on September 23, 2024

So, I went to version 1.26.1 of Visual Studio Code (previously I was on version 1.27.0-insider), and immediately the debugger worked again flawlessly. If you would like me to send over a zip file, I still can, but it might be best to wait a few days (the end of August, when the next Vscode build will come out for public use) and see if a large number of other people experience the same issue. Others might have more insight on the issue than myself.

Closing for now, but I definitely think we should re-open this if/when Vscode updates and still includes the flaw. Thanks so much for your patience and help!

Edit: Full version information of the not-working version:

Version: 1.27.0-insider
Commit: 3f8088b5c5f1d44b5e1af4a8e67448abbe66470e
Date: 2018-08-27T07:36:47.732Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

from hxcpp-debugger.

Related Issues (20)

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.