본문 바로가기

VS Code

vscode python selenium 디버깅 안되는 현상

반응형

대표적인 두개의 에러 상황에 대한 해결방법을 공유한다

 

이슈 1. import error for python module

 

해결방안

1. pip install 모듈네임

 

2. F1 > Pyton : Select Interpreter > 알맞는 버전 선택

 

 

이슈 2. lanuch.json 오류

 

해결방안

디버깅할 파일에서 f5로 바로 실행할 경우 아래처럼 작성하며 되며, 나의 환경과 다를 경우 아래 내용을 토대로 수정하면 된다

{
	// IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
	// 기존 특성에 대한 설명을 보려면 가리킵니다.
	// 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요.
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Python: Current File (Integrated Terminal)",
			"type": "python",
			"request": "launch",
			"program": "${file}",
			"cwd": "${workspaceRoot}",
			"env": {"PYTHONPATH": "${workspaceRoot}"},
			"console": "integratedTerminal",
			"justMyCode":false
		}
	]
}
반응형

'VS Code' 카테고리의 다른 글

VSCode 터미널에 실행프로그램 추가하기  (0) 2022.04.13