Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I debug the cppia part of the project use debugger like hxcpp-debugger? #82

Closed
YoudeLiu opened this issue Mar 27, 2018 · 2 comments
Closed

Comments

@YoudeLiu
Copy link

I am new to haxe, and I notice unreal.hx few weeks ago.
I think it's awesome and hope to study in depth.
I notice there is a vscode extension hxcpp-vscode-debugger that can debug the haxe code, after some study it works with the static part of unreal.hx code, but not the script part.
Is there any way for me to use the hxcpp-debugger with the script part?

@waneck
Copy link
Collaborator

waneck commented Mar 28, 2018

Hi there! It's great that you mention that - we've been working on some improvements to hxcpp-vscode-debugger to better suit unreal.hx and mainly to add cppia support.
In order to benefit from these changes, you'll have to:

  • Install our own fork of hxcpp-debugger by running haxelib git hxcpp-debugger https://github.com/proletariatgames/hxcpp-debugger.git
  • Use our own fork of hxcpp-vscode-debugger by using the unreal.hx branch on https://github.com/proletariatgames/vscode-hxcpp-debug , and building that
  • Add the entry { "debugger": true } to your uhxconfig.json file, which should be a sibling to your .uproject file.

Following these instructions, you can then proceed to create some tasks by editing your project's tasks.json file. The changes we made to hxcpp-vscode-debugger still isn't documented anywhere, but here's a snippet of our own file which should get you started:

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Attach to process",
      "compileDir": "${workspaceRoot}/Game/Haxe",
			"type": "hxcpp",
			"request": "attach",
		},
		{
			"name": "Run Editor - Development",
			"compileDir": "${workspaceRoot}/Game/Haxe",
			"type": "hxcpp",
			"request": "launch",
			"run": {
				"args": [
					"Engine/Binaries/Win64/UE4Editor.exe",
					"Game/myproj.uproject",
					"-stdout",
					"-AllowStdOutLogVerbosity"
				],
				"cwd": "${workspaceRoot}",
			},
			"port": -1
		},
		{
			"name": "Run Editor - DebugGame",
			"compileDir": "${workspaceRoot}/Game/Haxe",
			"type": "hxcpp",
			"request": "launch",
			"run": {
				"args": [
					"Engine/Binaries/Win64/UE4Editor.exe",
					"Game/myproj.uproject",
					"-stdout",
					"-AllowStdOutLogVerbosity",
					"RunConfig=Debug",
				],
				"cwd": "${workspaceRoot}",
			},
			"port": -1
		},
]}

@YoudeLiu
Copy link
Author

It works. thanks a lot~ ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants