xmake-io / xmake-vscode

🍩 A XMake integration in Visual Studio Code
https://xmake.io
Apache License 2.0
227 stars 54 forks source link

xmake-vscode问题 #276

Open fengjinfuyl opened 1 week ago

fengjinfuyl commented 1 week ago

Xmake 版本

2.9.5

操作系统版本和架构

版本 Windows 10 专业版 版本号 22H2 安装日期 ‎2024/‎3/‎28 操作系统内部版本 19045.4894 体验 Windows Feature Experience Pack 1000.19060.1000.0

描述问题

需求: 一、项目的输出是一个dll,启动某exe时会自动加载此dll并命中加载事件。 目前问题: 一、如我将类型设为启动,则提示无法启动dll,无法调试。 输入图片说明 二、如我将配置类型设为附加,弹出选择进程界面后,点击或者手选进程,也无法成功,弹出下述提示。 输入图片说明 假定第二个问题可以解决,其实也不完全符合需要。如采用附加形式,则必须先启动主exe,启动时已执行加载事件。总之以附加形式来调试dll插件,不能命中加载事件的断点。 分析: xmake-vscode插件对于启动的定义略窄,只理解为启动项目的生成exe。也应考虑到,会启动其他exe,其他exe调用此dll的场景。 参考: 如项目使用CMake来配置并生成,可这样来启动别的exe,并顺利在加载事件命中断点。 输入图片说明 环境: vscode版本:1.93.1 xmake-vscode插件版本:2.3.7 操作系统:win10

期待的结果

可以以启动的方式,启动指定路径的exe,此exe如会加载项目生成的dll时,能命中断点。

工程配置

无需

附加信息和错误日志

见问题描述

Issues-translate-bot commented 1 week ago

Bot detected the issue body's language is not English, translate it automatically.


Title: xmake-vscode problem

Xmake version

2.9.5

Operating system version and architecture

Version Windows 10 Pro Build Number 22H2 Installation Date ‎2024/‎3/‎28 OS Build 19045.4894 Experience Windows Feature Experience Pack 1000.19060.1000.0

Describe the problem

need:

  1. The output of the project is a dll. When starting an exe, this dll will be automatically loaded and the loading event will be hit. Current issues:
  2. If I set the type to startup, it prompts that the dll cannot be started and cannot be debugged. Enter picture description
  3. If I set the configuration type to additional and the process selection interface pops up, even if I click or manually select the process, it will not succeed and the following prompt will pop up. Enter picture description Assuming that the second problem can be solved, it is not entirely in line with the needs. If the additional form is used, the main exe must be started first, and the loading event has been executed during startup. In short, when debugging the dll plug-in in additional form, the breakpoint of the loading event cannot be hit. analyze: The xmake-vscode plug-in has a slightly narrower definition of startup, and only understands it as the generated exe to start the project. It should also be considered that other exes will be started and other exes will call this dll. refer to: If the project is configured and generated using CMake, you can start other exe in this way and successfully hit the breakpoint in the loading event. Enter picture description environment: vscode version:1.93.1 xmake-vscode plug-in version: 2.3.7 Operating system: win10

Expected results

You can start the exe with the specified path in the startup mode. If the exe loads the dll generated by the project, it can hit the breakpoint.

Project configuration

No need

Additional information and error logs

See problem description

waruqi commented 6 days ago

你不需要设置任何 launch.json 。。都是自动的,插件内部会自动生成 launch.json ,自动调用。。

点底下工具栏的 运行和调试按钮,不要点侧边栏的。

fengjinfuyl commented 6 days ago

我试过的,我的项目输出是dll,点击底部工具栏,提示the target program not found。我的目的是要启动系统中已安装的其他exe,理应在launch中配置,要不然插件怎么知道我要启动的exe的路径呢 ?

---原始邮件--- 发件人: @.> 发送时间: 2024年9月30日(周一) 上午9:21 收件人: @.>; 抄送: @.**@.>; 主题: Re: [xmake-io/xmake-vscode] xmake-vscode问题 (Issue #276)

你不需要设置任何 launch.json 。。都是自动的,插件内部会自动生成 launch.json ,自动调用。。

点底下工具栏的 运行和调试按钮,不要点侧边栏的。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

waruqi commented 6 days ago

动态库调试,目前不支持。

fengjinfuyl commented 6 days ago

好的,后续有支持计划嘛。

---原始邮件--- 发件人: @.> 发送时间: 2024年9月30日(周一) 中午1:23 收件人: @.>; 抄送: @.**@.>; 主题: Re: [xmake-io/xmake-vscode] xmake-vscode问题 (Issue #276)

动态库调试,目前不支持。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>