Comments (17)
等有时间 我会看下
from xmake-vscode.
今天我尝试使用yarn进行安装发现yarn安装的code-server是可以正常使用xmake插件的。deb包安装的code-server运行时则不可以使用xmake插件。
from xmake-vscode.
那就跟xmake插件本身没啥关系吧。。
from xmake-vscode.
但是debug的功能不能正常使用。启动debug之后界面呈现如下:
from xmake-vscode.
你本机mac? 用codelldb也不行? #26
from xmake-vscode.
vscode-server是部署在了ubuntu18.04上面,我在Windows下使用edge浏览器使用code-server进行debug发现需要添加配置。当我在ubuntu下面使用vscode进行调试的时候是不需要添加配置文件即可调试的。
from xmake-vscode.
没这么玩过 回头等空了 我看看
from xmake-vscode.
我没linux环境,我在mac下开local host去访问试了下,是可以的没啥问题,唯一的坑就是从market装的cpptools插件os不匹配,我手动从 https://github.com/microsoft/vscode-cpptools/releases 下载对应os版本装了下,其他没啥坑
感觉这个跟xmake的插件真没啥关系,点xmake的调试,也就是把target的program file path送入vscode的launch.json里面,让vscode的cpptools调试器自动加载,其他都是vscode和cpptools的事情。。你自己再研究下吧
from xmake-vscode.
json文件
请问launch.json
文件和tasks.json
文件像下面这么写正确吗?
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "debug",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/../build/chat_application",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "cmake_debug",
"miDebuggerPath": "/usr/bin/gdb"
},
]
}
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "debug",
"command": "xmake f -p linux -m debug && xmake && xmake r",
"args": [],
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"type": "shell",
"label": "release",
"command": "xmake f -p linux -m release && xmake && xmake r",
"args": [],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
]
}
]
}
问题一
点击debug按钮之后一直显示如下效,就红框框住的进度条没有任何反应:
问题二
另外请问为什么在本地进行调试的时候不需要写json配置文件也能正常debug呢?
from xmake-vscode.
我在本地进行测试之后,json文件应该是没有吗问题的,只是在云端无法正常使用。另外请问你的vscode-server是自行编译部署的还是在我提供的链接里面的项目进行部署的呢?
from xmake-vscode.
请问launch.json文件和tasks.json文件像下面这么写正确吗?
外置的配置我没写过,你自己研究下官方文档吧
点击debug按钮之后一直显示如下效,就红框框住的进度条没有任何反应:
这个就不清楚了,反正我这ok
另外请问为什么在本地进行调试的时候不需要写json配置文件也能正常debug呢?
插件里面会直接拼接相关launch的配置传给cpptools调试器,所以不需要自己写
Lines 87 to 102 in 98c28e8
当然内置的launch/debugger配置,也可以在用户配置中自定义重写的,具体看下 #19
from xmake-vscode.
另外请问你的vscode-server是自行编译部署的还是在我提供的链接里面的项目进行部署的呢?
直接从code server的 releases下 下载 bin 直接运行的
from xmake-vscode.
那有可能是环境不同导致的。如果有时间的话,你在ubuntu18.0 x86平台下部署测试一下吧,我再试试在ubuntu下面安装release文件运行看看正常不。另外我在树莓派4b下进行部署debug遇到了如下问题:
from xmake-vscode.
我没树莓派,没法测试,你可以参考 #19 的方式,改写下内部的 launch/debugConfig 来测试
"xmake.customDebugConfig": {
"type": "cppdbg",
"program": "xxxx"
... 其他所有配置
}
或者直接加载xmake-vscode源码,调试下 下面的代码
Lines 87 to 102 in 98c28e8
from xmake-vscode.
你在什么场景下需要该功能?
我在服务器上部署了vscode web,并安装了xmake插件,但是该插件不能够正常使用,希望能够增加对vscode web的适应性。
- ubuntu18.04
- vscode server
在ubuntu上部署vscode server可以参考该网址,直接下载对应deb包即可完成安装。可通过修改~/.config/code-server/config.yaml
绑定相应的ip地址与port。
对了,想起来了,因为在ubuntu18.04 x86_64下使用code-server的release包不能使用xmake插件所以改成了yarn安装。希望这个问题能够解决一下。关于树莓派的cppdbg问题应该是平台原因跟xmake插件无关,之后在本地解决问题之后会进行反馈以便于修改插件中的json配置。ubuntu18.04 x86_64平台下yarn安装的code-server确实无法正常调试,之后会向code-server项目提交issue。
from xmake-vscode.
对了,想起来了,因为在ubuntu18.04 x86_64下使用code-server的release包不能使用xmake插件所以改成了yarn安装。希望这个问题能够解决一下
这是code server的问题吧,跟xmake有啥关系,既然yarn装的可以,说明xmake没啥问题。。而且我这也没ubuntu环境做测试
from xmake-vscode.
已经移交到code-server的issue了。树莓派的问题是因为vscode-cpptools extension目前不支持arm平台。非常感谢你的耐心解答。
from xmake-vscode.
Related Issues (20)
- vscode下的xmake插件调试CPP工程出现bug HOT 2
- Introduce setting to hide certain status bar options
- 通过vscode的xmake插件debug运行程序时,未尊重xmake.lua 中 set_runargs 设置的命令行参数 HOT 2
- 在容器内使用(或者vscode以root权限运行时), xmake-vscode 会提示xmake not found! HOT 4
- 工程脚本域调用 print 会导致无法调试 HOT 4
- 当workspace里面有多个目录的时候,不能够自动检测目录,打开xmake文件也不能自动激活 HOT 2
- Make lsp backend configurable HOT 2
- 设置xmake build目录后调整不回去默认的 HOT 2
- vscode 调试配置launch.json无法添加visualizerFile属性 HOT 6
- C++设置xmake build目录重启虚拟机后编译可能检测不到代码变化 HOT 8
- cuda 项目生成的compile_commands貌似无法正常提示 HOT 6
- `project directory (/path/dir) is not empty!` error when using VSCode and auto generated `.vscode` directory. HOT 2
- 记住上次关闭时选中的target HOT 1
- 将生成"compile_commands.json"文件的默认地址从".vscode"文件夹移动到"build"文件夹 HOT 3
- 无法正常生成compile_commands,以及“Error:there is no registered task type 'cppbuild'” HOT 1
- option() to be visible in xmake vscode extension HOT 1
- "stopAtEntry" option from launch.json is not respected HOT 3
- VSCode 插件不生效 HOT 3
- Target里on_load打印消息,会导致run或debug无法运行 HOT 1
- 当使用set_targetdir设置输出目录后,在vscode中使用lanunch.json开启程序会报target program not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmake-vscode.