This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

*/

VSCode에서 launch.json 혹은 task.json에서 활용할 수 있는 사전에 정의된 변수들

미리 정의된 변수

다음과 같은 미리 정의된 변수가 지원됩니다.

  • ${userHome} - 사용자의 홈 폴더 경로
  • ${workspaceFolder} - VS Code에서 열린 폴더의 경로
  • ${workspaceFolderBasename} - 슬래시(/) 없이 VS Code에서 열린 폴더의 이름
  • ${file} - 현재 열린 파일
  • ${fileWorkspaceFolder} - 현재 열린 파일의 작업 공간 폴더
  • ${relativeFile} - 현재 열린 파일에 상대적인 파일workspaceFolder
  • ${relativeFileDirname} - 현재 열려 있는 파일의 상대 디렉터리 이름workspaceFolder
  • ${fileBasename} - 현재 열린 파일의 기본 이름
  • ${fileBasenameNoExtension} - 파일 확장자가 없는 현재 열린 파일의 기본 이름
  • ${fileExtname} - 현재 열린 파일의 확장자
  • ${fileDirname} - 현재 열린 파일의 폴더 경로
  • ${fileDirnameBasename} - 현재 열린 파일의 폴더 이름
  • ${cwd} - VS Code 시작 시 작업 실행기의 현재 작업 디렉터리
  • ${lineNumber} - 활성 파일에서 현재 선택된 줄 번호
  • ${selectedText} - 활성 파일에서 현재 선택된 텍스트
  • ${execPath} - 실행 중인 VS Code 실행 파일의 경로
  • ${defaultBuildTask} - 기본 빌드 작업의 이름
  • ${pathSeparator} - 파일 경로에서 구성 요소를 구분하기 위해 운영 체제에서 사용하는 문자

미리 정의된 변수 예

다음과 같은 요구 사항이 있다고 가정합니다.

  1. VSCode에서 작업공간으로 Open한 디렉토리가 c:/home/your-project이고,
  2. 편집기에 열린 파일이 c:/home/your-project/folder/file.ext일때,

따라서 각 변수에 대해 다음 값을 갖게 됩니다.

  • ${userHome} -c:/home/your-home혹은, 설치된 디렉토러리
  • ${workspaceFolder} -c:/home/your-project
  • ${workspaceFolderBasename} -your-project
  • ${file} -c:/home/your-project/folder/file.ext
  • ${fileWorkspaceFolder} -c:/home/your-project
  • ${relativeFile} -folder/file.ext
  • ${relativeFileDirname} -folder
  • ${fileBasename} -file.ext
  • ${fileBasenameNoExtension} -file
  • ${fileDirname} -c:/home/your-project/folder
  • ${fileExtname} -.ext
  • ${lineNumber} - 커서의 줄 번호
  • ${selectedText} - 코드 편집기에서 선택된 텍스트
  • ${execPath} - Code.exe의 위치
  • ${pathSeparator} - /macOS 또는 Linux, \Window


관련글

참고