xmake-io / xmake-idea

🍨 A XMake integration in IntelliJ IDEA
https://xmake.io
Apache License 2.0
76 stars 18 forks source link

macOS 需要手动添加配置并且没有调试模式 #44

Open L-Super opened 2 months ago

L-Super commented 2 months ago

Xmake 版本

v2.9.3+20240624

操作系统版本和架构

macOS 14.4.1

描述问题

在CLion上,安装xmake插件后,无法直接打开xmake工程,打开xmake.lua只是打开该文件。 新建工程,未自动创建配置。可以build,但是run会报错:

Please select a xmake run configuration first!

需要手动添加配置。

还有就是,调试模式置灰,不可用状态。

期待的结果

能够打开工程,新建工程能自动配置,启用调试模式

工程配置

add_rules("mode.debug", "mode.release")

target("xmake-demo")
    set_kind("binary")
    add_files("src/*.cpp")

附加信息和错误日志

/opt/homebrew/bin/xmake -y
[100%]: build ok, spent 0.126s

进程已结束,退出代码为 0
Please select a xmake run configuration first!
waruqi commented 2 months ago

run 你需要自己创建个 配置。

L-Super commented 2 months ago

不能像cmake一下,自动创建配置吗

waruqi commented 2 months ago

你可以来个 pr 支持上

L-Super commented 2 months ago

那调试器为什么不能使用呢?也需要额外配置?

waruqi commented 2 months ago

那调试器为什么不能使用呢?也需要额外配置?

暂时不支持,实现复杂度和时间成本太高。你也可以提个 pr 过来。

windchargerj commented 1 month ago

Creating a new XMake project will now automatically add a run configuration. #49

Unfortunately, an automatic build task before run still needs to wait for the completion of code refactoring.

waruqi commented 1 month ago

Unfortunately, an automatic build task before run still needs to wait for the completion of code refactoring.

set_policy("run.autobuild", true) or xmake f --policies=run.autobuild

waruqi commented 2 weeks ago

Unfortunately, an automatic build task before run still needs to wait for the completion of code refactoring.

set_policy("run.autobuild", true) or xmake f --policies=run.autobuild

we can add --policies=run.autobuild as a default additional config argument in run configuraion.