Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ New templates for debugging CMake projects on remote systems and WSL in Visual Studio 2019

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š New templates for debugging CMake projects on remote systems and WSL in Visual Studio 2019


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: devblogs.microsoft.com

We heard your feedback that it can be difficult to configure debugging sessions on remote Linux systems or the Windows Subsystem for Linux (WSL). In Visual Studio 2019 version 16.6 Preview 2 we introduced a new debugging template to simplify debugging with gdb.

  • All your existing debug configurations (of type
    cppdbg
    ย ) will continue to work as expected.
  • The new template of type
    cppgdb
    ย  will be used by default whenever you add a new Linux or WSL debug configuration.
  • You can read a full description of the new schema by checking out our updated documentation: https://aka.ms/vslinuxdebug. Keep reading for an overview of the new template and a remote debugging FAQ.
  • Note: In Visual Studio 2019 version 16.6 Preview 2 you will need to manually set the configuration type to This bug has been fixed in Preview 3.

The new cppgdb template

We heard your feedback that the old debug configurations were too verbose, too confusing, and not well documented. The new

cppgdb
ย  configuration has been simplified and looks like this:
{
  "type": "cppgdb",
  "name": "My custom debug configuration",
  "project": "CMakeLists.txt",
  "projectTarget": "DemoApp.exe",
ย  "comment": "Learn how to configure remote debugging. See here for more info http://aka.ms/vslinuxdebug",
  "debuggerConfiguration": "gdb",
  "args": [],
  "env": {}
}

The new setting debuggerConfiguration indicates which set of debugging default values to use. In Visual Studio 2019 version 16.6 the only valid option is gdb.

There are more optional settings that can be added and configured for your debugging scenario like gdbPath (path to gdb), cwd (path to the working directory where the program is run), and preDebugCommand (a new setting that allows a Linux command to run before starting the debugger). A full list of these settings and their default values are listed in our documentation.

Coming next: first-class support for gdbserver

In Visual Studio 2019 version 16.5 or later you can manually configure launch.vs.json to debug CMake projects with gdbserver. In an upcoming release of Visual Studio we will be adding first-class support for gdbserver to the new

cppgdb
ย  template. This will allow you to select gdbserver via the debuggerConfiguration setting and easily customize things like the path to gdbserver or the local path to gdb.

Remote debugging scenarios FAQ

There are a few frequently asked questions we receive about debugging on Linux and WSL. A selection of these are called out and answered with examples below.

How do I pass arguments to the program being debugged?

Command-line arguments passed on startup to the program being debugged are configured with the args array. Example:

"args": ["arg1", "arg2"],

How do I set environment variables? Do I need to re-set the environment variables I set in CMakeSettings.json?

In Visual Studio 2019 version 16.5 or later debug targets are automatically launched with the environment specified in CMakeSettings.json. You can reference an environment variable defined in CMakeSettings.json (e.g. for path construction) with the syntax โ€œ${env.VARIABLE_NAME}โ€. You can also unset a variable defined in CMakeSettings.json by setting it to null.

The following example passes a new environment variable (DISPLAY) to the program being debugged and unsets an environment variable (DEBUG_LOGGING_LEVEL) that is specified in CMakeSettings.json.

"env": {
 ย ย ย ย ย ย  "DISPLAY": "1.0",
 ย ย ย ย ย ย  "DEBUG_LOGGING_LEVEL": null
ย ย ย ย ย  },

Note: Old Linux/WSL configurations of type cppdbg depend on the โ€œenvironmentโ€ syntax. This alternative syntax is defined in our documentation.

I want to separate the system I am building on from the system I am debugging on. How do I do this?

Your build system (either a WSL installation or a remote system) is defined in CMakeSettings.json. Your remote debug system is defined by the key remoteMachineName in launch.vs.json.

By default, the value of remoteMachineName in launch.vs.json is synchronized with your build system. This setting only needs to be changed when specifying a new debug system. The easiest way to change the value of remoteMachineName in launch.vs.json is to use IntelliSense (ctrl + space) to view a list of all established remote connections.

IntelliSense in launch.vs.json prompts you with all of your existing connections defined in the Connection Manager.

There are several other (optional) deployment settings that can be used to configure the separation of build and debug listed in our documentation.

I want to interact directly with the underlying debugger. Can I do this?

Visual Studio allows you to execute custom gdb commands via the Command Window. To do so,

  • View > Other Windows > Command Window
  • Run: Debug.MIDebugExec insert-your-gdb-command-here

Iโ€™m debugging with gdb or gdbserver and something isnโ€™t working. How can I troubleshoot?ย 

You can enable logging to see what commands we are sending to gdb, what output gdb is returning, and how long each command took.

  • View > Other Windows > Command Window
  • Run: Debug.MIDebugLog (/On[:<filename>] | /Off) [/OutputWindow]

Options:

  • /On[:] โ€“ Turn on MIEngine logging. Optionally specify a file to contain the log. Either the file must be supplied, or the โ€œ/OutputWindowโ€ option must appear.
  • /Off โ€” Turn off MIEngine logging. If logging to a file, the file is closed.
  • /OutputWindow โ€” Log to the โ€œDebugโ€ pane in the output Window.

Give us your feedback

Download Visual Studio 2019 version 16.6 Preview 2 today and give it a try. Weโ€™d love to hear from you to help us prioritize and build the right features for you. We can be reached via the comments below,ย Developer Community, email (visualcpp@microsoft.com), and Twitter (@VisualC and @erikasweet_). The best way to file a bug or suggest a feature is via Developer Community.

The post New templates for debugging CMake projects on remote systems and WSL in Visual Studio 2019 appeared first on C++ Team Blog.

...



๐Ÿ“Œ New templates for debugging CMake projects on remote systems and WSL in Visual Studio 2019


๐Ÿ“ˆ 107.01 Punkte

๐Ÿ“Œ C++ Cross-Platform Development with Visual Studio 2019 version 16.3: vcpkg, CMake configuration, remote headers, and WSL


๐Ÿ“ˆ 59.51 Punkte

๐Ÿ“Œ Debugging Linux CMake Projects with gdbserver


๐Ÿ“ˆ 45.45 Punkte

๐Ÿ“Œ .NET Core Debugging with WSL 2 in Visual Studio 2019


๐Ÿ“ˆ 45.43 Punkte

๐Ÿ“Œ Visual Studio for Mac: Improve your Debugging Experience with these Tips | Visual Studio Toolbox


๐Ÿ“ˆ 42.96 Punkte

๐Ÿ“Œ CMake, Linux targeting, and IntelliSense improvements in Visual Studio 2019 version 16.5 Preview 2


๐Ÿ“ˆ 41.42 Punkte

๐Ÿ“Œ Usability Improvements for CMake in Visual Studio 2019 version 16.4: Launch Target Selection and Overview Pages


๐Ÿ“ˆ 41.42 Punkte

๐Ÿ“Œ Uniting all containers and Kubernetes fans in this Visual Studio 2019 session | Visual Studio 2019 Launch Event


๐Ÿ“ˆ 38.02 Punkte

๐Ÿ“Œ CMake Tools Extension for Visual Studio Code


๐Ÿ“ˆ 36.28 Punkte

๐Ÿ“Œ Build-Werkzeug: CMake fรผr Visual Studio Code in neuer Version


๐Ÿ“ˆ 36.28 Punkte

๐Ÿ“Œ Neues zur CMake-Entwicklung in Visual Studio


๐Ÿ“ˆ 36.28 Punkte

๐Ÿ“Œ Whatโ€™s New in Visual Studio for Mac 2019 | Visual Studio Toolbox


๐Ÿ“ˆ 35.81 Punkte

๐Ÿ“Œ Easily Add, Remove, and Rename Files and Targets in CMake Projects


๐Ÿ“ˆ 35.6 Punkte

๐Ÿ“Œ Visual Studio and accessibility - Visual Studio Remote Office Hours, 5/28


๐Ÿ“ˆ 35.52 Punkte

๐Ÿ“Œ The architecture and inner workings of Visual Studio - Visual Studio Remote Office Hours, July 2


๐Ÿ“ˆ 35.52 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - Azure DevTest and other Visual Studio benefits


๐Ÿ“ˆ 35.52 Punkte

๐Ÿ“Œ Visual Studio 2019 Launch: To the cloud with Visual Studio and Azure


๐Ÿ“ˆ 34.67 Punkte

๐Ÿ“Œ Visual Studio 2019 Launch: To the cloud with Visual Studio and Azure


๐Ÿ“ˆ 34.67 Punkte

๐Ÿ“Œ Visual Studio 2019 version 16.3 Preview 2 and Visual Studio for Mac version 8.3 Preview 2 Released!


๐Ÿ“ˆ 34.67 Punkte

๐Ÿ“Œ Visual Studio and Azure Sphere | Visual Studio 2019 Launch Event


๐Ÿ“ˆ 34.67 Punkte

๐Ÿ“Œ Visual Studio Code: Remote Dev with SSH, VMs, and WSL | Tabs vs Spaces


๐Ÿ“ˆ 34.64 Punkte

๐Ÿ“Œ Linux Development with C++ in Visual Studio 2019: WSL, ASan for Linux, Separation of Build and Debug


๐Ÿ“ˆ 33.79 Punkte

๐Ÿ“Œ Working with Git tooling in Visual Studio - Visual Studio Remote Office Hours, 4/30


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Codespaces - Visual Studio Remote Office Hours, July 9


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - Working on the Visual Studio code base, July 23


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - The History of Visual Studio with Matt Gertz


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - Deep dive into the Visual Studio profiler tools


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - The complex nature of the Visual Studio editor


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - From college to PM on the Visual Studio team


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - Rearchitecting Visual Studio for the future


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - Visual Studioโ€™s future extensibility model


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - Running the Visual Studio tech blogs


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - Hiring talent for the Visual Studio team


๐Ÿ“ˆ 33.73 Punkte

๐Ÿ“Œ Visual Studio Remote Office Hours - Working with large code bases in Visual Studio


๐Ÿ“ˆ 33.73 Punkte











matomo