Skip to content

Commit

Permalink
[App] Fix VSCode IDE debugger (#15747)
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaton committed Nov 21, 2022
1 parent 1a31d13 commit 6714ca7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lightning_app/CHANGELOG.md
Expand Up @@ -46,7 +46,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed race condition to over-write the frontend with app infos ([#15398](https://github.com/Lightning-AI/lightning/pull/15398))


-
- Fixed debugging with VSCode IDE ([#15747](https://github.com/Lightning-AI/lightning/pull/15747))



Expand Down
10 changes: 5 additions & 5 deletions src/lightning_app/core/app.py
Expand Up @@ -169,17 +169,17 @@ def __init__(

logger.debug(f"ENV: {os.environ}")

def _update_index_file(self):
# update index.html,
# this should happen once for all apps before the ui server starts running.
frontend.update_index_file(FRONTEND_DIR, info=self.info, root_path=self.root_path)

if _should_dispatch_app():
os.environ["LIGHTNING_DISPATCHED"] = "1"
from lightning_app.runners import MultiProcessRuntime

MultiProcessRuntime(self).dispatch()

def _update_index_file(self):
# update index.html,
# this should happen once for all apps before the ui server starts running.
frontend.update_index_file(FRONTEND_DIR, info=self.info, root_path=self.root_path)

def get_component_by_name(self, component_name: str):
"""Returns the instance corresponding to the given component name."""
from lightning_app.structures import Dict as LightningDict
Expand Down

0 comments on commit 6714ca7

Please sign in to comment.