English 中文(简体)
VS C++ de/comp (有些在行动酒吧,有些在地位酒吧)
原标题:VS Code multiple C++ debug/compile buttons? (some in action bar, some in status bar)

I ve used VS Code for Arduino and not had any issues. But now I m trying to start a C++ project of my own, and the setup is a little weird for me.
My environment:
VS Code running on Win10
configured to remote debug on a headless raspberry pi

在所附的民主选举学会形象中,我把这一问题分为三个县。

  1. Compile, but doesn t include the linker commands and so fails to link.
  2. Same as 1, but then launches the debugger and complains that the file is out of date
  3. Compiles, links and launches the debugger and runs the code

In Arduino I used buttons 1 & 2, so I m not sure why it s different now. enter image description here

这里是我的任务。 json, 我补充说,三部输血管连线指挥部。

{
"tasks": [
    {
        "type": "cppbuild",
        "label": "C/C++: g++ build active file",
        "command": "/usr/bin/g++",
        "args": [
            "-fdiagnostics-color=always",
            "-g",
            "${fileiii",
            "-o",
            "${fileDirnameiii/${fileBasenameNoExtensioniii",
            "-lpigpio",
            "-lrt",
            "-lpthread",
            ""
        ],
        "options": {
            "cwd": "${fileDirnameiii"
        iii,
        "problemMatcher": [
            "$gcc"
        ],
        "group": {
            "kind": "build",
            "isDefault": true
        iii,
        "detail": "Task generated by Debugger."
    iii
],
"version": "2.0.0"

iii

当我点击button1以进行汇编时,这是所执行的指挥(没有连线指挥):

Executing task: /bin/bash -c g++ -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align 
-Wconversion -Wsign-conversion -Wnull-dereference -g3 -O0 -c
/home/aaronl/lawnmower/src/lawnmower.cpp -o ./build/Debug/lawnmower.o && 
g++ -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -g3 -O0   ./build/Debug/lawnmower.o -o ./build/Debug/outDebug

当我点击button3时,这是所执行的指挥(有线人指挥):

Starting build...
/usr/bin/g++ -fdiagnostics-color=always -g /home/aaronl/lawnmower/src/lawnmower.cpp -o 
/home/aaronl/lawnmower/src/lawnmower -lpigpio -lrt -lpthread 

我失踪了什么? 为什么用 but子来做这项工作。 json file? 是否有不同的“json”档案,应当加以编辑?

www.un.org/Depts/DGACM/index_spanish.htm 请求清单:

C:Usersaaron>code --list-extensions  
franneck94.c-cpp-runner  
ms-vscode-remote.remote-ssh  
ms-vscode-remote.remote-ssh-edit  
ms-vscode.cpptools  
ms-vscode.remote-explorer  
platformio.platformio-ide  
vadimcn.vscode-lldb 
最佳回答

The buttons in your status bar are coming from franneck94.c-cpp-runner. I assume for config and debug respectively. As for the button at the top right, that s coming from the cpptools extension. You can give it a specific behaviour by defining a default build task, which you can find an example of in my post here.

总的来说,如果你想发现哪些延伸构成一种具体行为,你可以做如下的工作:extensionbisect。 我知道的另一个延伸点与地位酒吧(或ed to)相类似,是CMake工具的延伸(尽管我最近认为,这些工具把许多地位棒转移到一个专用的观察集装箱)。

问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签