Giter VIP home page Giter VIP logo

Comments (17)

waruqi avatar waruqi commented on June 15, 2024

等有时间 我会看下

from xmake-vscode.

wangzhankun avatar wangzhankun commented on June 15, 2024

今天我尝试使用yarn进行安装发现yarn安装的code-server是可以正常使用xmake插件的。deb包安装的code-server运行时则不可以使用xmake插件。

from xmake-vscode.

waruqi avatar waruqi commented on June 15, 2024

那就跟xmake插件本身没啥关系吧。。

from xmake-vscode.

wangzhankun avatar wangzhankun commented on June 15, 2024

但是debug的功能不能正常使用。启动debug之后界面呈现如下:
image

from xmake-vscode.

waruqi avatar waruqi commented on June 15, 2024

你本机mac? 用codelldb也不行? #26

from xmake-vscode.

wangzhankun avatar wangzhankun commented on June 15, 2024

vscode-server是部署在了ubuntu18.04上面,我在Windows下使用edge浏览器使用code-server进行debug发现需要添加配置。当我在ubuntu下面使用vscode进行调试的时候是不需要添加配置文件即可调试的。
image

from xmake-vscode.

waruqi avatar waruqi commented on June 15, 2024

没这么玩过 回头等空了 我看看

from xmake-vscode.

waruqi avatar waruqi commented on June 15, 2024

我没linux环境,我在mac下开local host去访问试了下,是可以的没啥问题,唯一的坑就是从market装的cpptools插件os不匹配,我手动从 https://github.com/microsoft/vscode-cpptools/releases 下载对应os版本装了下,其他没啥坑

image

感觉这个跟xmake的插件真没啥关系,点xmake的调试,也就是把target的program file path送入vscode的launch.json里面,让vscode的cpptools调试器自动加载,其他都是vscode和cpptools的事情。。你自己再研究下吧

from xmake-vscode.

wangzhankun avatar wangzhankun commented on June 15, 2024

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按钮之后一直显示如下效,就红框框住的进度条没有任何反应:
image

问题二

另外请问为什么在本地进行调试的时候不需要写json配置文件也能正常debug呢?

from xmake-vscode.

wangzhankun avatar wangzhankun commented on June 15, 2024

我在本地进行测试之后,json文件应该是没有吗问题的,只是在云端无法正常使用。另外请问你的vscode-server是自行编译部署的还是在我提供的链接里面的项目进行部署的呢?
image

from xmake-vscode.

waruqi avatar waruqi commented on June 15, 2024

请问launch.json文件和tasks.json文件像下面这么写正确吗?

外置的配置我没写过,你自己研究下官方文档吧

点击debug按钮之后一直显示如下效,就红框框住的进度条没有任何反应:

这个就不清楚了,反正我这ok

另外请问为什么在本地进行调试的时候不需要写json配置文件也能正常debug呢?

插件里面会直接拼接相关launch的配置传给cpptools调试器,所以不需要自己写

} else if (os.platform() == "linux") {
debugConfig = {
name: `launch: ${targetName}`,
type: 'cppdbg',
request: 'launch',
program: targetProgram,
args: args,
stopAtEntry: true,
cwd: targetRunDir,
environment: [],
externalConsole: false, // @see https://github.com/xmake-io/xmake-vscode/issues/36
MIMode: "gdb",
miDebuggerPath: "",
description: "Enable pretty-printing for gdb",
text: "-enable-pretty-printing",
ignoreFailures: true

当然内置的launch/debugger配置,也可以在用户配置中自定义重写的,具体看下 #19

from xmake-vscode.

waruqi avatar waruqi commented on June 15, 2024

另外请问你的vscode-server是自行编译部署的还是在我提供的链接里面的项目进行部署的呢?

直接从code server的 releases下 下载 bin 直接运行的

from xmake-vscode.

wangzhankun avatar wangzhankun commented on June 15, 2024

那有可能是环境不同导致的。如果有时间的话,你在ubuntu18.0 x86平台下部署测试一下吧,我再试试在ubuntu下面安装release文件运行看看正常不。另外我在树莓派4b下进行部署debug遇到了如下问题:
image

from xmake-vscode.

waruqi avatar waruqi commented on June 15, 2024

我没树莓派,没法测试,你可以参考 #19 的方式,改写下内部的 launch/debugConfig 来测试

"xmake.customDebugConfig": {
  "type": "cppdbg",
  "program": "xxxx"
  ... 其他所有配置
}

或者直接加载xmake-vscode源码,调试下 下面的代码

} else if (os.platform() == "linux") {
debugConfig = {
name: `launch: ${targetName}`,
type: 'cppdbg',
request: 'launch',
program: targetProgram,
args: args,
stopAtEntry: true,
cwd: targetRunDir,
environment: [],
externalConsole: false, // @see https://github.com/xmake-io/xmake-vscode/issues/36
MIMode: "gdb",
miDebuggerPath: "",
description: "Enable pretty-printing for gdb",
text: "-enable-pretty-printing",
ignoreFailures: true

from xmake-vscode.

wangzhankun avatar wangzhankun commented on June 15, 2024

你在什么场景下需要该功能?

我在服务器上部署了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.

waruqi avatar waruqi commented on June 15, 2024

对了,想起来了,因为在ubuntu18.04 x86_64下使用code-server的release包不能使用xmake插件所以改成了yarn安装。希望这个问题能够解决一下

这是code server的问题吧,跟xmake有啥关系,既然yarn装的可以,说明xmake没啥问题。。而且我这也没ubuntu环境做测试

from xmake-vscode.

wangzhankun avatar wangzhankun commented on June 15, 2024

已经移交到code-server的issue了。树莓派的问题是因为vscode-cpptools extension目前不支持arm平台。非常感谢你的耐心解答。

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.