vscode在win10 / linux下的.vscode文件夹的配置 (c++/c)
发布时间:2020-12-14 02:41:57 所属栏目:Windows 来源:网络整理
导读:系统方面配置自行查找 linux: launch.json { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 " version " : " 0.2.0 " , " configurations " : [ { " name
系统方面配置自行查找 linux: launch.json { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0","configurations": [ { "name": "(gdb) Launch","type": "cppdbg","request": "launch","program": "${workspaceRoot}/${fileBasenameNoExtension}.out","args": [],"stopAtEntry": false,"cwd": "${workspaceFolder}","environment": [],"externalConsole": true,"MIMode": "gdb","setupCommands": [ { "description": "Enable pretty-printing for gdb","text": "-enable-pretty-printing","ignoreFailures": true } ],"preLaunchTask": "build" } ] } tasks.json { "version": "2.0.0","tasks": [ { "label": "build",//任务名,和lanuch.json中的"preLaunchTask":"build"一致 "type": "shell","command": "g++","args":["-g","${workspaceRoot}/${fileBasenameNoExtension}.cpp","-o","${fileBasenameNoExtension}.out"],//要编译的文件mian_test.cpp,${workspaceRoot}表示vscode所打开的工作目录 "problemMatcher": { "owner":"cpp","fileLocation":["relative","${workspaceRoot}"],"pattern": { "regexp": "^([^\s].*)\((\d+,\d+)\):\s*(.*)$","file": 1,"line":2,"column":3,"severity": 4,"location": 2,"message": 5 } } } ] } win10: launch.json { "version": "0.2.0","preLaunchTask": "build","program": "${fileDirname}/${fileBasenameNoExtension}.exe","miDebuggerPath": "C:/mingw/bin/gdb.exe",// 这里修改GDB路径为安装的mingw64的bin下的gdb.exe路径 "setupCommands": [ { "description": "Enable pretty-printing for gdb","ignoreFailures": true } ] }] tasks.json { "version": "2.0.0","tasks": [ { "label": "build","type": "shell","group": { "kind": "build","isDefault": true },"presentation": { "echo": true,"reveal": "always","focus": false,"panel": "shared" },"windows": { "command": "g++","args": [ "-ggdb",""${file}"","--std=c++11","-o",""${fileDirname}${fileBasenameNoExtension}.exe"" ] } } ] } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Windows 2008 R2防火墙,允许被ping的设置方法
- 如何让Windows自动添加扩展名到文件?
- windows-server-2003 – 有没有办法在Windows更新设置中禁用
- windows-phone-7 – 支持芒果蓝牙的API?
- active-directory – 为什么计算机对象是CN而不是Microsoft
- Windows10安装node.js
- 批处理自动备份并生成日志文件
- windows-server-2003 – 如何设置Windows Server 2003以通知
- Windows Server如何与Windows桌面进行不同的优化?
- Windows尝试使用asadmin启动GlassFish时,“系统找不到指定的
推荐文章
站长推荐
- OpenProcess:仅在Windows 8.1上访问被拒绝错误
- IIS搭建Web服务器,外网可以访问,但无法加载视频
- command-line-interface – UnxUtils和GNU CoreU
- 如果在Windows批处理文件中声明
- 在Metro App XAML中的ListView中设置SelectedIte
- 如何使用WiX创建.msi安装程序
- 无法加载文件或程序集“Microsoft.WindowsAzure.
- windows-server-2008 – 如何确定我的DHCP服务器
- windows-server-2008 – 远程桌面服务远程音频问
- 批处理文件 – 单引号在Windows批处理文件中做什
热点阅读