eclipse에서 System.out.println을 sout이라는 단축키로 등록해놓고 사용했었는데 vscode에서는 그게 안됐다.
그래서 구글링하다가 발견한 아주 편리한 플러그인을 소개한다.
Java System Out Println
Java System Out Println - Visual Studio Marketplace
Extension for Visual Studio Code - Help insert and remove System.out.println(*) statement
marketplace.visualstudio.com
vscode 사이드바에 있는 마켓플레이스에 들어가서 Java System Out Println을 검색하서 설치하면 간단히 사용할 수 있다.
사용법 (MacOS)
command + shift + L
을 누르면 System.out.println(""); 이 커서가 있는 위치에 자동으로 생성된다.
그리고 특정 변수를 드래그 한 뒤 위 명령어를 입력하면 해당 명령어를 프린트하는 코드가 자동생성된다.
example)
...
String example = "hello";
...
예시 코드의 example을 드래그 한 뒤 command+shift+L을 누르면 아래와 같은 코드가 자동생성된다.
System.out.println("example: " + example);
// >> hello
짱편해!
'기술 > 개발 도구' 카테고리의 다른 글
Git) git push 실패 - remote: Invalid username or password.fatal: Authentication failed for <private repository> 해결 (0) | 2022.07.21 |
---|---|
VSCode) VSCode 업데이트 후 JAVA/Spring Boot 실행 오류 (0) | 2022.04.26 |
Git) Git-flow 알아보기 (0) | 2022.01.07 |
Git) 특정 파일이 gitignore 적용되지 않을 때 (0) | 2021.12.23 |
Git) GitHub Actions 사용법 (0) | 2021.07.16 |