• Visual Studio Code: launch.json


    c_cpp_properties.json

    1. {
    2. "configurations": [
    3. {
    4. "name": "Win32",
    5. "includePath": [
    6. "${workspaceFolder}/**",
    7. "D:/Kingsoft/mingw64/include/**",
    8. "D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++",
    9. "D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32",
    10. "D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward",
    11. "D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include",
    12. "D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed",
    13. "D:/Kingsoft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include"
    14. ],
    15. "defines": [
    16. "_DEBUG",
    17. "UNICODE",
    18. "__GNUC__=6",
    19. "__cdecl=__attribute__((__cdecl__))"
    20. ],
    21. "compilerPath": "D:/Kingsoft/mingw64/bin/gcc.exe",
    22. "cStandard": "c11",
    23. "cppStandard": "c++17",
    24. "intelliSenseMode": "gcc-x64"
    25. }
    26. ],
    27. "version": 4
    28. }

    launch.json

    1. // {
    2. // "version": "0.2.0",
    3. // "configurations": [
    4. // {
    5. // "name": "(Windows) Launch",
    6. // "type": "cppvsdbg",
    7. // "request": "launch",
    8. // "program": "cmd",
    9. // "preLaunchTask": "echo",
    10. // "args": [
    11. // "/C",
    12. // "${fileDirname}\\${fileBasenameNoExtension}.exe",
    13. // "&",
    14. // "echo.",
    15. // "&",
    16. // "pause"
    17. // ],
    18. // "stopAtEntry": false,
    19. // "cwd": "${workspaceFolder}",
    20. // "environment": [],
    21. // "console":"newExternalWindow"
    22. // },
    23. // {
    24. // "name": "(gdb) Launch",
    25. // "type": "cppdbg",
    26. // "request": "launch",
    27. // "targetArchitecture": "x64",
    28. // // "program": "C:/code/ccode1/exe/${fileBasenameNoExtension}.exe",
    29. // "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
    30. // "miDebuggerPath": "D:\\Kingsoft\\mingw64\\bin\\gdb.exe",
    31. // "args": [],
    32. // "stopAtEntry": false,
    33. // // "cwd": "${fileDirname}",
    34. // // "cwd": "C:/code/ccode1/exe/",
    35. // "cwd": "${workspaceFolder}",
    36. // "externalConsole": true,
    37. // "preLaunchTask": "g++"
    38. // }
    39. // ]
    40. // }
    41. {
    42. "version": "0.2.0",
    43. "configurations": [
    44. {
    45. "name": "(gdb) Launch",
    46. "type": "cppdbg",
    47. "request": "launch",
    48. "targetArchitecture": "x64",
    49. "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
    50. "miDebuggerPath": "D:\\Kingsoft\\mingw64\\bin\\gdb.exe",
    51. "args": [],
    52. "stopAtEntry": false,
    53. "cwd": "${workspaceFolder}",
    54. "externalConsole": true,
    55. "preLaunchTask": "g++"
    56. }
    57. ]
    58. }

    tasks.json

    1. {
    2. "version": "2.0.0",
    3. "command": "g++",
    4. "type": "shell",
    5. "presentation": {
    6. "echo": true,
    7. "reveal": "always",
    8. "focus": false,
    9. "panel": "new",//shared表示共享,改成new后每个进程创建新的端口,"panel"->"new"
    10. "showReuseMessage": true,
    11. "clear": false
    12. },
    13. "args": [
    14. // "-m32",
    15. "-fdiagnostics-color=always",
    16. "-g",
    17. "${file}",
    18. "-o",
    19. // "${fileDirname}/${fileBasenameNoExtension}.exe"
    20. "${workspaceFolder}/${fileBasenameNoExtension}.exe"
    21. // "C:/code/ccode1/exe/${fileBasenameNoExtension}.exe"
    22. //"-fexec-charset=GBK"
    23. ],//编译命令参数
    24. "problemMatcher": {
    25. "owner": "cpp",
    26. "fileLocation": [
    27. "relative",
    28. "${workspaceRoot}"
    29. ],
    30. "pattern": {
    31. "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
    32. "file": 1,
    33. "line": 2,
    34. "column": 3,
    35. "severity": 4,
    36. "message": 5
    37. }
    38. },
    39. "tasks": [
    40. {
    41. "type": "cppbuild",
    42. "label": "C/C++: gcc.exe 生成活动文件",
    43. "command": "D:\\Kingsoft\\mingw64\\bin\\gcc.exe",
    44. "args": [
    45. "-fdiagnostics-color=always",
    46. "-g",
    47. "${file}",
    48. "-o",
    49. "${fileDirname}\\${fileBasenameNoExtension}.exe"
    50. // "C:/code/ccode1/exe/${fileBasenameNoExtension}.exe"
    51. ],
    52. "options": {
    53. "cwd": "D:/Kingsoft/mingw64/bin"
    54. },
    55. "problemMatcher": [
    56. "$gcc"
    57. ],
    58. "group": {
    59. "kind": "build",
    60. "isDefault": true
    61. },
    62. "detail": "调试器生成的任务。"
    63. }
    64. ]
    65. }

  • 相关阅读:
    JMETER也会遇到加密难题,中文乱码也能一并处理
    面试公司ETL工程师(实习生)——笔试面试题(SQL)
    Unity打包出来的APK文件有问题总结
    Cesium:WFS请求两种方式
    【复盘】记录一次数据库连接资源占用完毕
    Android Framework基础知识:PMS职责
    卡尔曼滤波与融合算法
    制作php的composer包
    k8s中部署nginx-ingress实现外部访问k8s集群内部服务
    振兴农村循环经济 和数链串起农业“生态链”
  • 原文地址:https://blog.csdn.net/m0_72572822/article/details/132631128