HaxeFoundation / HaxeFoundation/hashlink
Breakpoints not working in worker threads created with sys.thread.Thread
- Dominant language
- C
- Stars
- 901
- Forks
- 201
- Avg merge
- 18h 9m
- Merged PRs (30d)
- 8
Description
- os: ubunt24 linux x64
- hashlink: 1.16 (Download at https://github.com/HaxeFoundation/hashlink/releases/tag/latest HashLink Nightly Build)
- vscode-hashlink-debugger: 1.4.33
- haxe: Haxe Compiler 4.3.3
```haxe
import sys.thread.Thread;
import sys.thread.Mutex;
import sys.thread.Lock;
class HelloWorld {
static function main() {
trace("Hello, World from Haxe!");
test1_BasicThreads();
}
static function test1_BasicThreads() {
var threads:Array = [];
for (i in 0...3) {
var thread = Thread.create(function() {
var threadId = i;
trace('thread $threadId start'); <---- Set vscode breakpoint at this line
Sys.sleep(0.5);
trace('start $threadId end');
});
threads.push(thread);
}
}
}
```
build.hxml
```xml
-hl hl_output/HelloWorld.hl
-main HelloWorld
```
tasks.json
```java
{
"version": "2.0.0",
"tasks": [
{
"label": "Build HashLink Debug",
"type": "haxe",
"args": "active configuration",
"problemMatcher": "$haxe",
"group": "build"
}
]
}
````
launch.json
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "HashLink (launch)",
"request": "launch",
"type": "hl",
"cwd": "${workspaceFolder}",
"preLaunchTask": {
"type": "haxe",
"args": "active configuration"
},
"program": "${workspaceFolder}/hl_output/HelloWorld.hl"
}
]
}
```
console out:
```bash
HelloWorld.hx:7: Hello, World from Haxe!
hashlink crashed and process stop
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.