vscode-cpptools | Official repository for the Microsoft C
kandi X-RAY | vscode-cpptools Summary
kandi X-RAY | vscode-cpptools Summary
C/C++ extension tutorials per compiler and platform.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vscode-cpptools
vscode-cpptools Key Features
vscode-cpptools Examples and Code Snippets
Community Discussions
Trending Discussions on vscode-cpptools
QUESTION
I'm coding a vscode extension following the guide and I came accross an import problem in my server.ts file. Here is the file tree:
...ANSWER
Answered 2021-Mar-03 at 11:41The vscode
package has been deprecated. It has now been split up into two packages which are @types/vscode
and vscode-test
. The reason for this refactoring can be found here.
You have included the @types/vscode
dependency but not vscode-test
.
Adding the vscode-test
dependency should fix your issue i.e.
QUESTION
I'm using VSCode (1.52.1) for a while on my Fedora 33 machine. I'm using Docker extension (v1.9.0) but for some reason, in the past few days when I'm trying to attach the VSCode to the Docker container, it failed to resolve the workspace folder.
I've tried to reinstall VSCode and the Docker extension but it did not help
I think this issue is related
As you can see, the files explorer does not show any files, instead, it shows a hash-like string.
...ANSWER
Answered 2021-Jan-14 at 12:48Accourding to this vs-code issue
You might have had that folder open before and it now no longer exists. Can you use File > Open Folder to open a different folder in the container?
All you need to do is go to
File --> Open Folder
in the top menu
open the wanted folder and that it.
That worked for me
QUESTION
Following the instructions in: https://nadiah.org/2020/03/01/example-debug-mixed-python-c-in-visual-studio-code/
I ran into a strange error. In step five it reads:
In the terminal, VS Code will tell you that superuser access is required to attach to a process. Type in Y and enter the root password.
However I can't type 'Y' since an extra line is added when I am asked if I want to continue as a super user. See image:
My launch.json is:
...ANSWER
Answered 2020-Dec-24 at 23:39I found a workaround using VSCode version 1.42.1. I don't know if other version work too. I hope this helps, but if you have a better solution using the latest version, please let us know by posting your answer. I reported this issue as a bug.
UPDATE: This bug was solved in VSCode version 1.52.1.
Happy coding !
QUESTION
I have configured my task.json and c_cpp_properties.json so that I may compile my main.cpp program. In order to proceed, I must press
...ANSWER
Answered 2019-Jun-19 at 23:03After spending two days messing around with this I've finally able to correct setup C++ on VS Code and resolved the error.
According to the png image from above, I've included "C:\MinGW\bin" within the user variable "Path" under the dialogue box "User variables for Me". After a simple restart on my computer, I was able to build my project (Shift + Ctrl + B) with no problems.
QUESTION
at the moment I am using a windows machine and wanted to try out windows subsystem for linux(wsl) for c++ development. Visual studio code(vsc) provides a neat extension for working on the subsystem that works quite well. One thing I could not get to work yet is getting vsc to include header files that are located inside the subsystem.
I know that I can manually add new paths to include in ´c_cpp_properties.json´ but I do not know any of the paths to point from windows into the subsystems /usr/include(as an example). I found some resources (wsl include paths) but could not get it to work anyway. I also tried generating the paths myself as described in the gitlab issue but that did not help either.
Anyone got some experience setting up vsc with wsl for c++ projects who would be able to help me?
...ANSWER
Answered 2020-Apr-05 at 19:30you need to create this file to setup the paths and more c_cpp_properties.json for more information you can take a look here https://code.visualstudio.com/docs/cpp/config-wsl#_cc-configurations
HAPPY CODING ,
QUESTION
While working on an embedded project, I noticed that sprintf()
method for the following code:
ANSWER
Answered 2019-Nov-20 at 19:17ln2
points to a string literal. String literals are read-only, so when you attempt to write to it you invoke undefined behavior.
You should instead define ln2
as a character array which is writable.
QUESTION
I have a quite complex bash script on Linux which prepares all the structures and parameters in turn fed to a Python command. However, I would like to use the Visual Studio debugger on this Python command while running it inside the bash script.
Is this possible? How can I start a debug session from the bash script?
P.S.: I've found out a similar issue for C++ https://github.com/Microsoft/vscode-cpptools/issues/3502#issuecomment-48637124
...ANSWER
Answered 2019-Jun-13 at 21:37There currently isn't a way to have the Python debugger in VS Code execute a Python script because the debugger itself needs to start the Python code to attach to it properly.
You can vote for this feature request to get the functionality you desire.
QUESTION
So I've been using VS Code for a while now and I noticed that for some reason it started having extra snippets which I did not make come up in options, while they are useful I would like to edit them to my personal code formatting style.
I've tried looking for the json
file which holds them however I am unable to locate it anywhere. I figured it would be in my install directory however the cpp.json
file there simply defines the #pragma region
snippet only.
For reference I looked in this location: C:\Users\Rietty\AppData\Local\Programs\VSCode\resources\app\extensions\cpp\snippets
A difference to show the two snippets is like so: and my user defined one which is marked with a user snippet
next to the description.
I also got many new for
loops and so on and so forth:
Where can I find the location of these new snippets so I can edit them to my standards/formatting style?
Update:
I spent a decent bit looking this up and it seems the reason for this is due to the VSCode CPP Tools extension. Recent changes indicate that this occurred due to moving snippets to the hard-coded lexer from the relevant json
file and that it is currently intended.
However an issue was already filed and is hopefully slated to be fixed sometime February 2019.
...ANSWER
Answered 2019-Mar-29 at 12:29This was fixed in release 0.22.0 of Visual Studio Code - CPP Tools with the release of the suggestSnippets
setting. Now you don't have to worry about duplicating snippets due to the language server and can only use your hand made ones.
QUESTION
I have read the guide, and as far as I understand it I should be able to set the type
in launch.json
to cppvsdbg
but this shows up greyed out, I'm guessing that indicates some kind of error? Then when I actually click debug I get this error:
ANSWER
Answered 2017-Jul-08 at 21:53Okay after some more digging I've at least figured out a work around. I was hitting this Debug button in the status bar at the bottom of the screen.
But if I switch to the debug mode by hitting the bug button on the left and then hit the green run arrow my debugger actually seems to work.
I still have no idea why these buttons do different things, or why the one on bottom doesn't work, but at least I can work around it for now. If anyone has any more insight on this I'd be happy to learn more.
QUESTION
I'd like to debug the C DLL quickfuncs.dll
, compiled with -g (debug symbols) by MinGW64, in VSCode. This DLL is used by C# DLL (also compiled with debug symbols), which is runned by:
"C:\Program Files\dotnet\dotnet.exe" exec "D:\Server\bin\Debug\netcoreapp2.0\Server.dll" Parameter1=test
I've configured launch.json
based on https://github.com/Microsoft/vscode-cpptools/blob/master/launch.md
ANSWER
Answered 2018-Sep-04 at 08:13I found the solution on https://github.com/Microsoft/vscode-cpptools/issues/2452.
pieandcakes wrote:
With MinGW you have to send Ctrl+C to the debuggee to pause. The pause button doesn't work because we can't send SIGINT through
gdb
's MI protocol. The command we typically use is-exec-interrupt
but that doesn't work. The procedure (unfortunately) is:
- Hit
pause
in the UI- Go to the debuggee and press
Ctrl+c
.At that point the debuggee should stop. It is only then that the breakpoints bind.
This solution works for me. Many thanks.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vscode-cpptools
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page