hxcpp-debugger icon indicating copy to clipboard operation
hxcpp-debugger copied to clipboard

Breakpoints within threads not working properly

Open acodervic opened this issue 1 year ago • 2 comments

Breakpoints within threads not working properly.

  • Os: linux x64 ubuntu 20
  • Haxe Version: 4.0.5

This is my code .

import sys.thread.Thread;
class Main {
	static function printMessage(message:String = "Default Message") {
		trace(message);
	}
	static function main() {
		printMessage();
	  #if (target.threaded)
		sys.thread.Thread.create(() -> {
		while (true) {
			trace("other thread");
			Sys.sleep(1);
				printMessage();
		}
		});
		Sys.sleep(300);
		#end
		
	}
}

my build-cpp.hxml

-cp src
-D analyzer-optimize
--debug
-lib hxcpp-debug-server
-main Main
--cpp bin/cpp

build cpp appliction with debug info :

 haxe build-cpp.hxml 

My vscode debugger config is :

		{
			"name": "HXCPP",
			"type": "hxcpp",
			"request": "launch",
			"program": "${workspaceFolder}/bin/cpp/Main-debug"
		}

Start the debugger . The breakpoint in another thread is not working . screenscast_20240222_214837

Please help me thanks !

acodervic avatar Feb 22 '24 13:02 acodervic

I switch my haxe to latest(4.3.3) ,The problem still exists.

acodervic avatar Feb 23 '24 01:02 acodervic

Try to reproduce via console interface please https://github.com/HaxeFoundation/hxcpp-debugger/wiki/Getting-started

nulld avatar Feb 23 '24 08:02 nulld