Closed raigorx closed 1 year ago
xmake v2.8.1+dev.732d60063
windows 11 home 10.0.22621 Build 22621
when you debug the target is selected in a random way.
I make a repo that reproduce the bug https://github.com/raigorx/xmake-bug
try to do the run and debug in vscode select xmake and the target you will see in the debug console a random target each time you run and debug
The fix that works for me is edit the auto generate launch.json
{ "version": "0.2.0", "configurations": [ { "type": "xmake", "request": "launch", "name": "Debug XMake target", "target": "target name", "cwd": "${workspaceFolder}", "stopAtEntry": true }, { "name": "Debug target: target-one\r", "type": "xmake", "target": "target-one\r", // remove this /r and it works fine "request": "launch" } ] }
you select a debug target and an random one target is run.
target("target-one") set_kind("binary") add_files("./target-one.cpp") target("target-two") set_kind("binary") add_files("./target-two.cpp")
No related to build
you can open a pr to fix it.
I have fixed it.
Xmake Version
xmake v2.8.1+dev.732d60063
Operating System Version and Architecture
windows 11 home 10.0.22621 Build 22621
Describe Bug
when you debug the target is selected in a random way.
I make a repo that reproduce the bug https://github.com/raigorx/xmake-bug
try to do the run and debug in vscode select xmake and the target you will see in the debug console a random target each time you run and debug
The fix that works for me is edit the auto generate launch.json
Expected Behavior
you select a debug target and an random one target is run.
Project Configuration
Additional Information and Error Logs
No related to build