Improving Editor Setup and First Use for neophyte #12069
Replies: 5 comments 6 replies
-
Hi @antoniocaruso, I'll try my best to go through these issues and explain where we are currently at as an extension and probe where you think we might be able to do better. Configuration is one of the areas where we receive a lot of feedback, and we've tried a lot of ideas out to make things easier for people, so we're always open to learn of new opportunities to make this better. However, I ask that you please be patient with my response times as my day is booked with meetings and I have a lot to say about the problem areas you've mentioned. I may end up doing one at a time as individual responses depending on how my availability looks this week. Thanks for understanding! |
Beta Was this translation helpful? Give feedback.
-
Issue 1
Today's behaviorThe C++ extension automatically searches for compilers it knows about. If the compilers it finds are in a location we can trust (e.g. Program Files folder on Windows, or in the PATH environment variable on all systems), the extension can automatically activate IntelliSense for one of those compilers. In a lot of cases, this "just works" for people IF they have a compiler installed already and no manual configuration is required. You mentioned mingw which is installed directly under the C: drive by default. We originally trusted this path by default and it used to "just work", but as a result of a security bug opened against us by the community, we had to revoke trust for this path and now ask for confirmation from the user before activating IntelliSense with this compiler. Once they have confirmed, we shouldn't bother them again about it. The compiler will be saved in the To deal with libraries and includes, we default to a special configuration mode we refer to as "recursive includes." This means we will attempt to resolve Additional strategies we employ include:
If all of these automatic strategies fail and it looks like the workspace is still unconfigured, we will then show a warning on the status bar that will prompt the user to take additional action when clicked. The "Select IntelliSense Configuration..." command that will be launched provides some of our best guesses as to what you might need to do to get IntelliSense at least partially configured and it also provides a command that can help you install a compiler if you don't have one already. What's next?We are aware of several embedded compilers that do not work the same as the main 3 (GCC/Clang/MSVC). Some of them are quite popular, but we don't have a way to get information out of them to auto-configure IntelliSense. We have been working on a way to support more compilers, but it is not ready yet and had to be postponed a few releases. #6931 We could certainly use your feedback on any scenarios we've missed. There are various build systems for C++, so we have been unable to reach everyone's use cases. But we have covered several common scenarios already and could potentially cover more if you'd like to outline what didn't work for you that you'd like to see work automatically in the future. |
Beta Was this translation helpful? Give feedback.
-
Issue 2
Where we are todayThere are many ways to declare and orchestrate C++ project builds. Due to the lack of a uniform way to build C and C++ programs, the C++ extension has abstained from trying to build in support for any one build system. Instead, we have delegated build system support to other extensions such as the CMake Tools and Makefile Tools extensions. For simple compilations of a single source file, we added a "play" button in the editor. Clicking this button prompts you to select which compiler you'd like to build with and then produces an exectuable that will be run with or without a debugger attached. This process generates the What's next?There's not a lot planned in this space right now. We've considered attempting to link the IntelliSense configuration to the build tasks but do not yet have a design that we think will work effectively and not confuse users. We've also considered adding a side panel that would allow people to organize their source files into libraries and executables that we could build for them. But we are not committed to this right now as we are hesitant to invent yet another build system, especially since it would be one that only works within VS Code. We could consider designing a side panel to organize build tasks and allow some customization to it, but we're not sure what this would look like yet. If we were to offer the possibility to set up compiler options for our "play" button, what would you be looking for, and how would you expect it to be presented to the users such that they can discover the feature and use it? Would you expect it to be able to compile more than one file at a time, or just the current file? Would you like an additional option on the "play" button to "just compile" without running or debugging the executable? |
Beta Was this translation helpful? Give feedback.
-
Issue 3
Where we are todayWe have the capability to "just run" the executable that we build with our "play" button described in my response for Issue 2. For configuring the command line arguments, there is a gear button next to the "play" button in the editor that will generate a What's next?We've considered building a feature to allow users to identify the executable that they'd like to run in VS Code and help them set up We do get feedback about folks not wanting to edit json files though. We created a web page view of our IntelliSense settings and could potentially do something like that for build and run/debug settings. However, we have avoided creating workarounds for configuration files that the VS Code team owns as we think it would be more appropriate for VS Code to support this so that all users can benefit from it, not just C++ users. It doesn't mean we couldn't do something here ourselves, but we would consult with the VS Code team first. |
Beta Was this translation helpful? Give feedback.
-
Issue 4
What's next?Could you provide a few more specifics around what you are asking for here? What "complex tools" are you referring to? I mentioned a feature to help guide users through the run executable/debugger configuration process in my response for Issue 3. We could use that thread to discuss expectations/needs for that task. |
Beta Was this translation helpful? Give feedback.
-
After an interesting email exchange with @bobbrow, I opened this discussion.
The idea is to focus on 'fist contact with VSC' and in particular for students, or other people that are learning to program. Since VSC is not a competitor to VS, it is important to care about people that use 'in the community', that are not expert developers.
I raised two problems that has been already discussed in several Issues without a clear solutions.
Compilers: The scenario that I consider is always the same. The user can download easily a zip file with all the proper compilers and build environment, for example the ones provided by mingw64. So, I assume that there is a directory that is already unzipped somewhere in the file systems, for example in C:\mingw64.
There is however no change in the system PATH. So this must be taken into account.
Problems:
if you select the first option, it still open a file request window, (why?) and if you select the compiler (it is not clear if the selection must specify a path to a folder or to a binary). NOTHING HAPPEN.
No feedback, no real communication to the user. I expected something like 'ok, Default Compiler = c:\mingw64\g++', just to know that it worked. But there is no feedback.
Moreover, if you try to compile, the tool is used without a path, and the PATH in the subshell is not set, so the final outcome is
g++: command not found.
I hope the community would consider that all this scenario is not appropriate to a 'community edition'. If people want to work with a real IDE, they download 20GB of data and install VS. Then there is no need to use VSC.
Beta Was this translation helpful? Give feedback.
All reactions