Coder Social home page Coder Social logo

Comments (14)

jprochazk avatar jprochazk commented on August 15, 2024 4

I'd also like this feature, because I don't use the mouse much when writing code, and being able to click the keyboard button to start debugging my program would be nice.

@littlewater It is not possible to bind XMake: Debug to F5, but it is possible to use F6 instead.

Go into File > Preferences > Keyboard Shortcuts, write xmake into the search bar, find XMake: Debug, right click it and click Change Keybinding, then click F6 and Enter. Right click it again and click Change When Expression. Write editorLangId == 'cpp' && debugState != 'running' into the field, and press Enter. This will ensure that F6 will only trigger XMake: Build if you are not already in a debugging session. It should look like this:

https://i.imgur.com/azqRT3c.png

from xmake-vscode.

waruqi avatar waruqi commented on August 15, 2024 2

可以了,#99

from xmake-vscode.

waruqi avatar waruqi commented on August 15, 2024

我刚已经说了,xmake原本就会通过底下的按钮生成launch.json带起调试器,只是没对接任何快捷键而已。。

#33 (comment)

from xmake-vscode.

littlewater avatar littlewater commented on August 15, 2024

这个我知道能启动,纯键盘我也可以运行,只是觉得按CTRL+SHIFT+P,然后选xmake:debug稍微慢一点,F5太习惯了。
xmake生成的launch.json有没有可能产生到.vscode目录下,我看了一下现在还没有,我下午实验了下launch.json,看了点其他的type的类型,像node,还有extenionHost,也不知道怎么添加自定义的调用的,再研究下去感觉走的太远了,姑且就丢在这便当作一个request,也不是很着急,如果能完善最好吧。

from xmake-vscode.

littlewater avatar littlewater commented on August 15, 2024

之前我记得#33也有人提过,然后我看到你代码里面的一部分实现,就是内部lua产生动态的launcher,后面肯定都没问题的,纯粹只是使用习惯的事情了。

from xmake-vscode.

waruqi avatar waruqi commented on August 15, 2024

这个我知道能启动,纯键盘我也可以运行,只是觉得按CTRL+SHIFT+P,然后选xmake:debug稍微慢一点,F5太习惯了。

就首次需要切debug mode编译而已,即使f5 首次还是要切debug编译的。。

之后的调试运行,只需要点一些下面的调试按钮就起来了,也不需要 按CTRL+SHIFT+P ,我感觉比按f5还快,就鼠标点下就好了。。

即使要接入f5,那也就是注册响应下f5按键事件,内部调用下跟底下按钮相同的func触发调试就行了,为啥还要折腾lauch啥的呢,xmake-vscode里面原本就弄好的。

from xmake-vscode.

paakmau avatar paakmau commented on August 15, 2024

感觉还是集成到.vscode/launch.json和tasks.json好一点?

我看隔壁也开始做这个事情了
microsoft/vscode-cmake-tools#1268

from xmake-vscode.

paakmau avatar paakmau commented on August 15, 2024

倒也不是说隔壁就很牛逼,只是希望能更好的集成到vscode上

from xmake-vscode.

waruqi avatar waruqi commented on August 15, 2024

感觉还是集成到.vscode/launch.json和tasks.json好一点?

我看隔壁也开始做这个事情了
microsoft/vscode-cmake-tools#1268

主要是我现在暂时没时间研究这块,只能先自己绑定下 凑活着用吧,或者可以帮忙提个pr过来。

from xmake-vscode.

paakmau avatar paakmau commented on August 15, 2024

噢噢,确实也是😂😂

from xmake-vscode.

wangzhankun avatar wangzhankun commented on August 15, 2024

希望能够增加launch.json和tasks.json,我这边在远程连接的时候总是出现xmake的插件图标无法显示的问题,就很难受。 不知道根使用的终端有没有关系。我用的是zsh,在~/.zshrc的最后一行添加了source ~/.xmake/profile

from xmake-vscode.

waruqi avatar waruqi commented on August 15, 2024

launch.json和tasks.json

图标问题,跟增加 launch.json和tasks.json 有什么关系,跟这个issue 也没啥关系,请新开 issue 详细描述问题和复现步骤。

from xmake-vscode.

wangzhankun avatar wangzhankun commented on August 15, 2024

launch.json和tasks.json

图标问题,跟增加 launch.json和tasks.json 有什么关系,跟这个issue 也没啥关系,请新开 issue 详细描述问题和复现步骤。

因为想着加了之后就可以按F5进行debug了,有没有图标也不影响了。同时也方便传参数。

from xmake-vscode.

waruqi avatar waruqi commented on August 15, 2024

launch.json和tasks.json

图标问题,跟增加 launch.json和tasks.json 有什么关系,跟这个issue 也没啥关系,请新开 issue 详细描述问题和复现步骤。

因为想着加了之后就可以按F5进行debug了,有没有图标也不影响了。同时也方便传参数。

上面有人提供方案,自己绑到 f6上调,而且按下面的调试按钮 也没麻烦多少

现在也可以传参,暂时没时间搞

from xmake-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.