GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add .hx to MONO_EXTENSIONS by vadzim-vys · Pull Request #35 · microsoft/vscode-mono-debug

Conversation

@vadzim-vys

@vadzim-vys vadzim_v (vadzim-vys) commented Jun 1, 2017

Copy link
Copy Markdown

Let's add .hx extension to supported extensions.
Haxe is language which can be compiled to c#, it overrides path and line number using line directive.

This Haxe code:

 public static function main() 
 {
        var array = 1...10;
        for (i in array){
            trace('Hello world $i');
        }
        
 }

will be compiled to this c# code:

public static void main() {
		unchecked {
			#line 5 "/Users/vadzimv/Projects/haxe_cs_debug/sample/Test.hx"
			global::IntIterator array = new global::IntIterator(1, 10);
			{
				#line 6 "/Users/vadzimv/Projects/haxe_cs_debug/sample/Test.hx"
				global::IntIterator _g = array;
				#line 6 "/Users/vadzimv/Projects/haxe_cs_debug/sample/Test.hx"
				while (( _g.min < _g.max )) {
					#line 6 "/Users/vadzimv/Projects/haxe_cs_debug/sample/Test.hx"
					int i = _g.min++;
					global::haxe.Log.trace.__hx_invoke2_o(default(double), global::haxe.lang.Runtime.concat("Hello world ", global::haxe.lang.Runtime.toString(i)), default(double), new global::haxe.lang.DynamicObject(new int[]{302979532, 1547539107, 1648581351}, new object[]{"main", "Test", "Test.hx"}, new int[]{1981972957}, new double[]{((double) (7) )}));
				}
				
			}
			
		}
		#line default
	}

Because of line directive mono debugger works well with .hx files, so I believe mono debugger can be used to debug haxe code for c# target without any other changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Vadzim Vysotski
added .hx extention
523862f
@weinand

Andre Weinand (weinand) commented Jun 15, 2017

Copy link
Copy Markdown
Contributor

I would like to verify this. How do I compile Haxe to C# on macOS?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vadzim-vys

vadzim_v (vadzim-vys) commented Jun 15, 2017

Copy link
Copy Markdown
Author

Please install haxe: https://haxe.org/download/
I've published a simple project for you to test: https://github.com/VysotskiVadim/haxe-vscode-monodebug-sample , just open, put breakpoint and launch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@weinand
Andre Weinand (weinand) merged commit 71fadd9 into microsoft:master Jun 16, 2017
@weinand Andre Weinand (weinand) self-assigned this Jun 16, 2017
@weinand Andre Weinand (weinand) added the feature request label Jun 16, 2017
@weinand Andre Weinand (weinand) added this to the June 2017 milestone Jun 16, 2017
@weinand

Andre Weinand (weinand) commented Jun 16, 2017

Copy link
Copy Markdown
Contributor

@VysotskiVadim thanks a lot for the PR and even more so for the sample project! That helped a lot.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vadzim-vys

vadzim_v (vadzim-vys) commented Jun 16, 2017

Copy link
Copy Markdown
Author

I'm glad to help! thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vadzim-vys
vadzim_v (vadzim-vys) deleted the feature/add-hx-extension branch September 15, 2018 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@weinand Andre Weinand (weinand)

Labels

feature request

Projects

None yet

Milestone

June 2017

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@vadzim-vys @weinand
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.