Kaynağa Gözat

添加 VSCode 配置文件以支持 Python 调试和环境管理

zhch158_admin 2 hafta önce
işleme
8a5bebd06f
2 değiştirilmiş dosya ile 29 ekleme ve 0 silme
  1. 20 0
      .vscode/launch.json
  2. 9 0
      .vscode/settings.json

+ 20 - 0
.vscode/launch.json

@@ -0,0 +1,20 @@
+{
+	// 使用 IntelliSense 了解相关属性。 
+	// 悬停以查看现有属性的描述。
+	// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+	"version": "0.2.0",
+	"configurations": [
+		{
+			"name": "python",
+			"type": "debugpy",
+			"request": "launch",
+			"program": "${file}",
+			"console": "integratedTerminal",
+			"cwd": "${fileDirname}",
+			"env": {"PYTHONPATH":"${workspaceFolder};${env:PYTHONPATH}"},
+			"envFile": "${workspaceFolder}/.env",
+			// "args": ["--inputs", "sample_data/600916_中国黄金_2022年报_利润表", "--threshold", "0.2",  "--output_dir", "sample_data/output"],
+			"justMyCode": false
+		},
+	]
+}

+ 9 - 0
.vscode/settings.json

@@ -0,0 +1,9 @@
+{
+	"python-envs.pythonProjects": [
+		{
+			"path": "",
+			"envManager": "ms-python.python:conda",
+			"packageManager": "ms-python.python:conda"
+		}
+	]
+}