Skip to content

Commit

Permalink
Add python interpreter into vscode settings (#3014)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
  • Loading branch information
thomasjpfan authored Dec 19, 2024
1 parent 23beed9 commit e9a7da1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flytekit/interactive/vscode_lib/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def prepare_resume_task_python(pid: int):

def prepare_launch_json():
"""
Generate the launch.json for users to easily launch interactive debugging and task resumption.
Generate the launch.json and settings.json for users to easily launch interactive debugging and task resumption.
"""

task_function_source_dir = os.path.dirname(
Expand Down Expand Up @@ -337,6 +337,10 @@ def prepare_launch_json():
with open(os.path.join(vscode_directory, "launch.json"), "w") as file:
json.dump(launch_json, file, indent=4)

settings_json = {"python.defaultInterpreterPath": sys.executable}
with open(os.path.join(vscode_directory, "settings.json"), "w") as file:
json.dump(settings_json, file, indent=4)


VSCODE_TYPE_VALUE = "vscode"

Expand Down

0 comments on commit e9a7da1

Please sign in to comment.