门户网站个人可以做,悉知网站建设,莆田室内设计公司排名,南京网站建设开发之前都是在Visual Studio写C/C#xff0c;最近想换到VScode#xff0c;折腾半天把launch.json和tasks.json配好了#xff08;虽然不懂为什么#xff0c;但确实能用了#xff09;#xff0c;在此做个记录。
参考资料#xff1a;1#xff0c;2#xff0c;3
环境#…之前都是在Visual Studio写C/C最近想换到VScode折腾半天把launch.json和tasks.json配好了虽然不懂为什么但确实能用了在此做个记录。
参考资料123
环境win10
launch.json如下
{configurations: [{name: C/C: g.exe build and debug active file,type: cppdbg,request: launch,program: ${workspaceFolder}\\${fileBasenameNoExtension}.exe,args: [],stopAtEntry: false,cwd: ${workspaceFolder},environment: [],externalConsole: false,MIMode: gdb,miDebuggerPath: E:\\mingw64\\bin\\gdb.exe,setupCommands: [{description: Enable pretty-printing for gdb,text: -enable-pretty-printing,ignoreFailures: true},{description: Set Disassembly Flavor to Intel,text: -gdb-set disassembly-flavor intel,ignoreFailures: true}],preLaunchTask: C/C: g.exe build active file}],version: 2.0.0}
tasks.json如下
{tasks: [{type: cppbuild,label: C/C: g.exe build active file,command: E:\\mingw64\\bin\\g.exe,args: [-fdiagnostics-coloralways,-g,${workspaceFolder}/*.cpp,-o,${workspaceFolder}\\${fileBasenameNoExtension}.exe],options: {cwd: ${fileDirname}},problemMatcher: [$gcc],group: {kind: build,isDefault: true},detail: Task generated by Debugger.}],version: 2.0.0}