IT/개발환경

[개발환경] VSCode 설정 파일

블랙오닉스 2025. 1. 4. 13:00

2024.01.04

VSCode 환경 파일 정리

c_cpp_properties.json

{
	"configurations": [
		{
			"name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                ".../dir_a",
                ".../dir_b",
                ".../dir_c"
             ],
			"defines": [],
			"compilerPath": ".../bin/g++",
			"cppStandard": "c++11",
			"intelliSenseMode": "gcc-x64"
		}
	],
"version": 4
}

 

launch.json

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "(gdb) Launch",
			"type": "cppdbg",
			"request": "launch",
			"program": ".../project/sha256",
			"args": [  ],
			"stopAtEntry": true,
			"cwd": ".../project",
			"environment": [],
			"externalConsole": false,
			"MIMode": "gdb",
			"setupCommands": [
				{
					"description": "Enable pretty-printing for gdb",
					"text": "-enable-pretty-printing",
					"ignoreFailures": true
				}
			],
			"preLaunchTask": "g++ build",
			"miDebuggerPath": "/bin/gdb"
		}
	]
}

tasks.json

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "shell",
			"label": "g++ build",
			"command": ".../bin/g++",
			"args": [
				"-g",
				"-std=c++11",
				"-DSC_INCLUDE_DYNAMIC_PROCESSES",
				"-Wl,-rpath=.../lib,-rpath=.../shared/lib",
				"./main.cpp",
				"./sha256.cpp",
				"-I/.../project/sha256",
				"-I/.../shared/include",
				"-L/.../shared/lib",
				"-Wl,-Bstatic",
				"-lsystemc",
				"-Wl,-Bdynamic",
				"-lpthread",
				"-o",
				"/.../project"
			],
			"group": {
				"kind": "build",
				"isDefault": true
			}
		},
		{
			"type": "shell",
			"label": "run",
			"command": ".../sha256 ",
			"dependsOn": [
				"g++ build"
			],
			"problemMatcher": []
		},
		{
			"type": "shell",
			"label": "trace",
			"command": "gtkwave trace.vcd",
			"dependsOn": [
				"run"
			],
			"problemMatcher": []
		}
	]
}